/* ============================================================
   626 在线登录口 · /assets/site.css
   高原晨光目录册：悬浮胶囊导航 / 画册式排版 / 藏红与鎏金节奏
   ============================================================ */

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

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

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

a { color: inherit; }

button { font: inherit; color: inherit; }

/* ---------- 变量 ---------- */
:root {
  --snow: #FBF7F0;
  --stone: #E8E1D6;
  --ink: #1C1A18;

  --crimson: #A62B2F;
  --crimson-deep: #6E1D22;
  --gold: #D6A84B;
  --gold-soft: #F0D9A6;
  --plateau: #2F5D7C;
  --plateau-deep: #163A4A;
  --jade: #5E7F6E;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: min(1240px, calc(100% - 2.5rem));
  --radius-pill: 999px;
  --radius-lg: 26px;
  --radius-md: 16px;

  --shadow-island: 0 20px 45px -32px rgba(28, 26, 24, .55);
  --shadow-card: 0 16px 36px -30px rgba(28, 26, 24, .55);

  --ease: cubic-bezier(.22, .68, .25, 1);
}

/* ---------- 基础排版 ---------- */
body {
  background-color: var(--snow);
  background-image:
    radial-gradient(120% 90% at 84% -12%, rgba(240, 217, 166, .55), transparent 62%),
    radial-gradient(80% 62% at -12% 6%, rgba(47, 93, 124, .10), transparent 66%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .01em;
}

p { text-wrap: pretty; }

::selection {
  background: rgba(214, 168, 75, .45);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-footer :focus-visible { outline-color: var(--gold-soft); }

/* ---------- 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 200;
  padding: .7rem 1.25rem;
  background: var(--crimson-deep);
  color: var(--snow);
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: 0 0 14px 14px;
  box-shadow: var(--shadow-island);
  transition: top .22s var(--ease);
}

.skip-link:focus { top: 0; }

/* ============================================================
   头部：悬浮胶囊浮岛
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: .75rem 0 .35rem;
  background: linear-gradient(180deg,
    rgba(251, 247, 240, .97) 0%,
    rgba(251, 247, 240, .84) 64%,
    rgba(251, 247, 240, 0) 100%);
}

.header-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-island {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .45rem .5rem .45rem .55rem;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--stone);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-island);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* --- 品牌 --- */
.brand {
  display: flex;
  align-items: center;
  gap: .68rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--crimson), var(--crimson-deep));
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: .9rem;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(214, 168, 75, .5);
  transition: transform .3s var(--ease);
}

.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: .05em;
  color: var(--ink);
}

.brand-tagline {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--plateau);
  white-space: nowrap;
}

/* --- 主导航 --- */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
  counter-reset: nav;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .46rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .875rem;
  letter-spacing: .03em;
  color: var(--plateau-deep);
  text-decoration: none;
  transition: background .22s var(--ease), color .22s var(--ease);
}

.nav-link::before {
  counter-increment: nav;
  content: counter(nav, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  color: var(--gold);
  transform: translateY(-1px);
}

.nav-link:hover {
  background: var(--gold-soft);
  color: var(--crimson-deep);
}

.nav-link[aria-current="page"] {
  background: var(--crimson-deep);
  color: var(--snow);
}

.nav-link[aria-current="page"]::before { color: var(--gold-soft); }

/* --- 右侧工具区 --- */
.header-tail {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.header-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--plateau);
  white-space: nowrap;
}

/* --- 按钮体系 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: .62rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}

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

.btn-primary {
  background: var(--crimson);
  color: #FFF;
  box-shadow: 0 12px 26px -20px rgba(110, 29, 34, .9);
}

.btn-primary:hover { background: var(--crimson-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--stone);
  color: var(--plateau-deep);
}

.btn-ghost:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--crimson-deep);
}

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

.btn-gold:hover { background: var(--gold-soft); }

.btn-sm {
  padding: .44rem .9rem;
  font-size: .82rem;
}

.btn-block { width: 100%; }

/* --- 移动导航按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .45rem;
  padding: .42rem .8rem;
  background: transparent;
  border: 1px solid var(--stone);
  border-radius: var(--radius-pill);
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.nav-toggle:hover { border-color: var(--gold); background: var(--gold-soft); }

.nav-toggle-label { line-height: 1; }

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background .2s var(--ease);
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .26s var(--ease);
}

.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }

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

/* --- 顶部阅读进度 --- */
.progress-rail {
  width: var(--shell);
  height: 2px;
  margin: .5rem auto 0;
  border-radius: 2px;
  background: rgba(232, 225, 214, .9);
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  transition: width .12s linear;
}

/* ============================================================
   页脚：深藏红主块 + 深蓝底条
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 7rem);
  background: var(--crimson-deep);
  color: var(--snow);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 240px;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 12% 0%, rgba(214, 168, 75, .22), transparent 62%),
    radial-gradient(90% 100% at 88% 6%, rgba(47, 93, 124, .55), transparent 66%);
}

.footer-ridge {
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  pointer-events: none;
  background:
    radial-gradient(70% 130% at 18% 100%, rgba(214, 168, 75, .16), transparent 70%),
    linear-gradient(180deg, transparent, rgba(22, 58, 74, .38));
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid rgba(240, 217, 166, .28);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 36ch;
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.footer-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  border: 1px solid rgba(240, 217, 166, .55);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: .9rem;
  letter-spacing: .03em;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: .07em;
  color: var(--snow);
}

.footer-desc {
  font-size: .92rem;
  line-height: 1.85;
  color: rgba(251, 247, 240, .78);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .85rem;
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  color: rgba(251, 247, 240, .86);
}

.contact-key {
  flex: 0 0 auto;
  min-width: 3.4em;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--gold);
}

.contact-value {
  color: var(--snow);
  word-break: break-word;
}

.contact-note {
  font-size: .78rem;
  line-height: 1.8;
  color: rgba(251, 247, 240, .6);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  align-content: start;
}

.footer-col-title {
  margin-bottom: .95rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer-link {
  display: inline-block;
  padding-bottom: 1px;
  font-size: .92rem;
  letter-spacing: .03em;
  color: rgba(251, 247, 240, .84);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-link:hover {
  color: var(--snow);
  border-bottom-color: rgba(214, 168, 75, .75);
}

.footer-base {
  position: relative;
  z-index: 1;
  background: var(--plateau-deep);
  border-top: 1px solid rgba(240, 217, 166, .22);
}

.footer-base-inner {
  width: var(--shell);
  margin-inline: auto;
  padding: 1.05rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  font-size: .78rem;
  color: rgba(251, 247, 240, .72);
}

.footer-copy {
  font-family: var(--font-mono);
  letter-spacing: .03em;
}

.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: .06em;
  color: var(--gold-soft);
}

/* ============================================================
   通用版式与组件
   ============================================================ */
.container {
  width: var(--shell);
  margin-inline: auto;
}

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--crimson);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.25rem, 7vw, 7rem);
  line-height: 1.02;
  letter-spacing: .02em;
  color: var(--ink);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: .015em;
  color: var(--ink);
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.85;
  color: var(--plateau-deep);
}

.meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .07em;
  color: var(--plateau);
}

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

.divider {
  height: 1px;
  border: 0;
  background: var(--stone);
}

/* --- 卡片 --- */
.card {
  position: relative;
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  background: #FFF;
  border: 1px solid var(--stone);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 22px 42px -32px rgba(110, 29, 34, .55);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--ink);
}

.card-text {
  margin-top: .5rem;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--plateau-deep);
}

.card-foot {
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px solid var(--stone);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--plateau);
}

/* --- 标签与状态 --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .22rem .65rem;
  border: 1px solid rgba(214, 168, 75, .55);
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--crimson-deep);
}

.chip-jade {
  background: rgba(94, 127, 110, .14);
  border-color: rgba(94, 127, 110, .42);
  color: #43604F;
}

.chip-plateau {
  background: rgba(47, 93, 124, .12);
  border-color: rgba(47, 93, 124, .38);
  color: var(--plateau-deep);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .09em;
  color: var(--jade);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(94, 127, 110, .18);
}

/* --- 图片容器 --- */
.media { display: block; margin: 0; }

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--stone);
  border-radius: var(--radius-md);
  background:
    linear-gradient(150deg, var(--gold-soft), #FFFFFF 46%, rgba(47, 93, 124, .18));
}

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

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

.media-caption {
  margin-top: .6rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--plateau);
}

/* --- 控制面板 --- */
.panel {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--plateau-deep);
  color: var(--snow);
  box-shadow: 0 26px 50px -40px rgba(22, 58, 74, .9);
}

.panel .section-title,
.panel .card-title { color: var(--snow); }

.panel .lede { color: rgba(251, 247, 240, .82); }

/* --- 目录索引 --- */
.index-list {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  border-left: 1px solid var(--stone);
}

.index-link {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-left: -1px;
  padding: .45rem .85rem;
  border-left: 2px solid transparent;
  font-size: .82rem;
  letter-spacing: .03em;
  color: var(--plateau);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease);
}

.index-link:hover {
  background: rgba(240, 217, 166, .38);
  color: var(--crimson-deep);
}

.index-link[aria-current="true"] {
  border-left-color: var(--crimson);
  color: var(--crimson);
  font-weight: 500;
}

/* --- 面包屑 --- */
.breadcrumb { margin-block: 1.25rem; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .07em;
  color: var(--plateau);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "／";
  color: var(--stone);
}

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

.breadcrumb-link:hover {
  color: var(--crimson);
  border-bottom-color: var(--gold);
}

/* --- 滚动显现（JS 开启后才生效，无 JS 时内容始终可见） --- */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

html.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .header-note { display: none; }
}

@media (max-width: 1080px) {
  .site-island {
    flex-wrap: wrap;
    gap: .5rem;
    padding: .55rem .7rem;
    border-radius: var(--radius-lg);
  }

  .brand { order: 1; }
  .header-tail { order: 2; margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; }

  .brand-tagline { display: none; }

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

  .site-nav { display: none; padding-top: .3rem; }

  .site-nav[data-open] {
    display: block;
    animation: nav-drop .26s var(--ease) both;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .12rem;
  }

  .nav-link {
    justify-content: flex-start;
    padding: .68rem .8rem;
    border-radius: 13px;
    font-size: .95rem;
  }

  .nav-link::before { font-size: .7rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .footer-brand { max-width: none; }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --shell: calc(100% - 1.5rem); }

  .site-header { padding: .55rem 0 .3rem; }

  .site-island { padding: .4rem .5rem; gap: .45rem; }

  .brand { gap: .55rem; }

  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: .8rem; }

  .brand-name { font-size: .92rem; letter-spacing: .03em; }

  .header-tail { gap: .4rem; }

  .header-tail .btn-sm { padding: .38rem .72rem; font-size: .78rem; }

  .nav-toggle { padding: .38rem .68rem; font-size: .78rem; }

  .footer-nav { grid-template-columns: 1fr; gap: 1.5rem; }

  .footer-base-inner { justify-content: flex-start; }

  .media-frame { aspect-ratio: 4 / 3; }
}

/* ============================================================
   减少动态 / 高对比偏好
   ============================================================ */
@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;
  }

  html.reveal-ready [data-reveal],
  html.reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .progress-bar { transition: none; }
}

@media (prefers-contrast: more) {
  .nav-link { color: var(--ink); }
  .footer-desc,
  .contact-note { color: rgba(251, 247, 240, .92); }
  .card { border-color: #B9AE9C; }
}
