/* ==========================================================================
   BET9 主页 · 共享样式表 /assets/site.css
   未来档案室 × 数字工具库
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-navy: #0F1631;
  --indigo-deep: #1B2650;
  --indigo-raise: #16203F;
  --cream: #F3EDE1;
  --charcoal: #241E19;
  --cyan: #31E1D2;
  --orange: #FF8A3C;
  --violet: #A855F7;
  --rose: #FF4D8D;
  --mist: #9BA6C8;
  --success: #12796F;

  --font-display: "Helvetica Neue", "HarmonyOS Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "HarmonyOS Sans", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  --font-editorial: Georgia, "Songti SC", "SimSun", serif;

  --shell: 1440px;
  --gutter: clamp(20px, 4.2vw, 60px);
  --gutter-y: clamp(72px, 9vw, 150px);

  --r-card: 18px;
  --r-sm: 10px;
  --r-pill: 999px;

  --line: rgba(155, 166, 200, .16);
  --line-soft: rgba(155, 166, 200, .1);
  --line-strong: rgba(155, 166, 200, .32);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-navy);
  background-image:
    radial-gradient(920px 540px at 6% -8%, rgba(49, 225, 210, .075), transparent 70%),
    radial-gradient(780px 500px at 100% 2%, rgba(168, 85, 247, .1), transparent 72%);
  background-repeat: no-repeat;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. 排版基元 ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: .02em;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(28px, 3.4vw, 48px);
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
}

.lead {
  max-width: 760px;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.8;
  color: rgba(243, 237, 225, .8);
}

.divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--line-strong), transparent 78%);
}

/* ---------- 4. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 900px; }

.stack {
  display: flow-root;
  --stack-gap: clamp(24px, 3vw, 40px);
}

.stack > * + * { margin-top: var(--stack-gap); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              color .18s var(--ease), border-color .18s var(--ease);
}

.btn--solid {
  background: var(--orange);
  color: #1A1207;
}

.btn--solid:hover { transform: translateY(-4px); background: #FF9A57; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--cream);
}

.btn--ghost:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 300;
  transform: translateY(-140%);
  padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: var(--cyan);
  color: #06201E;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  transition: transform .2s var(--ease);
}

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

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--indigo-deep);
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header[data-scrolled] {
  background: var(--indigo-raise);
  box-shadow: 0 22px 44px -36px rgba(0, 0, 0, .95);
}

.site-header__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 2.6vw, 44px);
}

/* 品牌轨道 */
.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--cyan);
  text-decoration: none;
  transition: border-color .18s var(--ease);
}

.brand:hover { border-left-color: var(--orange); }

.brand__mark {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream);
  transition: color .18s var(--ease);
}

.brand:hover .brand__mark { color: var(--cyan); }

.brand__mark::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  vertical-align: middle;
}

.brand__line {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .12em;
  color: var(--mist);
  white-space: nowrap;
}

/* 命令栏导航 */
.cmd-nav { min-width: 0; }

.cmd-nav__list {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 2px;
}

.cmd-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: rgba(243, 237, 225, .7);
  font-size: clamp(12.5px, .86vw, 14px);
  line-height: 1.4;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}

.cmd-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}

.cmd-nav__link:hover,
.cmd-nav__link:focus-visible {
  color: var(--cream);
  background: rgba(255, 255, 255, .05);
}

.cmd-nav__link:hover::after,
.cmd-nav__link:focus-visible::after { transform: scaleX(1); }

.cmd-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--mist);
  transition: color .18s var(--ease);
}

.cmd-nav__link:hover .cmd-nav__idx { color: var(--cyan); }

.cmd-nav__link[aria-current="page"] {
  color: var(--cream);
  background: rgba(49, 225, 210, .12);
}

.cmd-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.cmd-nav__link[aria-current="page"] .cmd-nav__idx { color: var(--cyan); }

/* 右侧操作区 */
.header-aside {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdr-chip {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(155, 166, 200, .07);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.5;
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(49, 225, 210, .38);
  border-radius: var(--r-pill);
  background: rgba(49, 225, 210, .08);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.nav-toggle:hover { background: rgba(49, 225, 210, .18); border-color: var(--cyan); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 14px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  background: currentColor;
}

.site-header[data-open] .nav-toggle {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A1207;
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--orange) 58%, var(--rose) 100%);
  pointer-events: none;
  will-change: transform;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: var(--gutter-y);
  background: var(--ink-navy);
  border-top: 1px solid var(--line);
  color: var(--mist);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: .5;
}

.site-footer__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 88px) var(--gutter) clamp(36px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr);
  gap: clamp(32px, 5vw, 88px);
}

.footer-brand .brand { margin-bottom: 18px; }

.footer-lede {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--mist);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}

.footer-col__title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(243, 237, 225, .78);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}

.footer-link:hover { color: var(--cream); }
.footer-link:hover::after { transform: scaleX(1); }

.site-footer__base {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 24px var(--gutter) clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  font-size: 13px;
  line-height: 1.7;
}

.footer-contact { color: rgba(243, 237, 225, .82); }
.footer-legal { color: rgba(155, 166, 200, .68); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb { margin-bottom: clamp(20px, 2.4vw, 32px); }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.breadcrumb__link {
  color: var(--mist);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.breadcrumb__link:hover { color: var(--cyan); }

.breadcrumb__sep { color: rgba(155, 166, 200, .45); }

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .06em;
  white-space: nowrap;
}

.tag--cyan { color: #7FF3E7; border-color: rgba(49, 225, 210, .45); background: rgba(49, 225, 210, .1); }
.tag--orange { color: #FFC49A; border-color: rgba(255, 138, 60, .45); background: rgba(255, 138, 60, .12); }
.tag--violet { color: #D8BAFF; border-color: rgba(168, 85, 247, .5); background: rgba(168, 85, 247, .16); }
.tag--success { color: #74E6D8; border-color: rgba(18, 121, 111, .7); background: rgba(18, 121, 111, .26); }

/* ---------- 11. 档案卡 ---------- */
.file-card {
  --accent: var(--cyan);
  position: relative;
  overflow: hidden;
  padding: 26px 24px 24px 30px;
  border-radius: var(--r-card);
  background: var(--cream);
  color: var(--charcoal);
  box-shadow: 0 24px 46px -34px rgba(0, 0, 0, .8);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.file-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 56px -34px rgba(0, 0, 0, .85);
}

.file-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.file-card--cyan { --accent: var(--cyan); }
.file-card--orange { --accent: var(--orange); }
.file-card--violet { --accent: var(--violet); }
.file-card--rose { --accent: var(--rose); }

.file-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(36, 30, 25, .62);
}

.file-card h3,
.file-card h2 {
  font-family: var(--font-editorial);
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.file-card p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(36, 30, 25, .8);
}

/* ---------- 12. 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 92% at 10% 6%, rgba(49, 225, 210, .22), transparent 58%),
    radial-gradient(104% 84% at 94% 94%, rgba(168, 85, 247, .26), transparent 62%),
    var(--indigo-deep);
}

.media > img,
.media > picture,
.media > video,
.media > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media__figcaption {
  position: absolute;
  inset: auto 12px 12px auto;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: rgba(15, 22, 49, .74);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
}

/* ---------- 13. 渐显 ---------- */
[data-reveal] { transition: opacity .55s var(--ease), transform .55s var(--ease); }
[data-reveal="pending"] { opacity: 0; transform: translateY(18px); }
[data-reveal="in"] { opacity: 1; transform: none; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1280px) {
  .hdr-chip { display: none; }
}

@media (max-width: 1040px) {
  html { scroll-padding-top: 80px; }

  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding-block: 10px;
  }

  .brand { padding-left: 11px; }
  .brand__mark { font-size: 21px; letter-spacing: .14em; }
  .brand__line { display: none; }

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

  .header-aside { gap: 8px; }
  .header-aside .btn { display: none; }

  .cmd-nav {
    order: 3;
    flex-basis: 100%;
    display: none;
    max-height: 62vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

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

  .cmd-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .cmd-nav__link {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 15px;
    letter-spacing: .06em;
  }

  .cmd-nav__link::after { display: none; }
  .cmd-nav__link:hover { transform: none; }

  .cmd-nav__link[aria-current="page"] {
    background: rgba(49, 225, 210, .14);
    box-shadow: inset 3px 0 0 var(--cyan);
  }

  .cmd-nav__idx { font-size: 11px; color: var(--orange); }

  .site-footer__inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

  .footer-cols { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__base { flex-direction: column; justify-content: flex-start; }
  .section-head { align-items: flex-start; }
  .btn { padding: 11px 18px; font-size: 12px; }
}

/* ---------- 15. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  [data-reveal],
  [data-reveal="pending"],
  [data-reveal="in"] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn--solid:hover,
  .btn--ghost:hover,
  .file-card:hover { transform: none; }
}
