@charset "UTF-8";
/*!
 * base.css — 全局基础层（所有页面共用）
 *
 * 目录
 *   1. 设计令牌（颜色 / 字体 / 缓动 / 设计稿单位）
 *   2. 重置与排版基线
 *   3. 无障碍
 *   4. 定位原子 .rect 与排版原子 .mid / .mid-col
 *   5. 舞台、底板与文本层
 *   6. 入场动画
 *   7. 浮动 UI（滚动进度 / 返回顶部 / 文字弹层）
 *   8. 降级与动效偏好
 *
 * 约定
 *   - 断点只有一个：900px。以上用 PC 设计稿（1920 宽），以下用移动设计稿（750 宽）。
 *     修改断点时，必须同步 js/core.js 里的 MOBILE_QUERY。
 *   - 所有尺寸都来自设计稿像素，不写死 px；新增元素请沿用 .rect + CSS 变量。
 */

/* ==========================================================================
   1. 设计令牌
   ========================================================================== */
:root {
  /* 颜色 */
  --c-white: #fff;
  --c-bg: #0a2a68;
  --c-bg-deep: #071e4e;
  --c-blue: #1764c8;
  --c-ink: #173a76;
  --c-accent: #8ec5ff;
  --c-line: rgba(255, 255, 255, .3);
  --c-text-86: rgba(226, 240, 255, .86);
  --c-text-82: rgba(223, 239, 255, .82);

  /* 缓动曲线 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.2, .8, .3, 1);

  /* 设计稿单位 --u：1 个设计稿像素等于多少 CSS 像素。
     - 默认值由 CSS 自己算，JS 失效时排版依然正确；
     - core.js 会用舞台实测宽度覆盖它，消除滚动条占宽带来的偏差；
     - min() 用来抵消超宽屏下 .stage 有 max-width 造成的放大。 */
  --u: calc(min(100vw, 1920px) / 1920);

  /* 字体：取自 6 份 PSD 的文字层 FontSet。
     方正兰亭黑 / 汉仪旗黑 / AdobeHeitiStd 均为商业字体，安装正版后自动生效；
     未安装时回退到字形最接近的系统字体（微软雅黑即方正兰亭黑的微软定制版），
     因此不需要为了字体改动任何布局参数。 */
  --font-title: "HYQiHei-HES", "HYQiHei 65S", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-en: "HYQiHei-FES", Arial, "Helvetica Neue", sans-serif;
  --font-info: "AdobeHeitiStd-Regular", "Adobe Hei Std R", "Microsoft YaHei", sans-serif;
  --font-section: "FZLTZHJW--GB1-0", "FZLanTingZhongHeiS-R-GB", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-body: "FZLTHJW--GB1-0", "FZLanTingHeiS-R-GB", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-thin: "FZLTXIHJW--GB1-0", "FZLTXHJW--GB1-0", "FZLanTingXiHeiS-R-GB", "Microsoft YaHei", sans-serif;
  --font-footer: "SourceHanSansSC-Regular", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

@media (max-width: 900px) {
  :root { --u: calc(100vw / 750); }
}

/* ==========================================================================
   2. 重置与排版基线
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; text-decoration: none; }

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   3. 无障碍
   ========================================================================== */
.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;
}

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

/* ==========================================================================
   4. 定位原子
   ========================================================================== */
/* .rect = 设计稿里的一个矩形。
   直接把 PSD 的 bbox 写进变量，由这一条规则换算成百分比：
     --x / --y / --w / --h   设计稿坐标与尺寸（四个都必填）
     --fz                    设计稿字号
     --ls                    设计稿字距
   --dw / --dh 为该端设计稿的画布宽高，由页面根类给出（见 home.css / config.css）。

   为什么用百分比而不是 calc(--u * n)：
   底板图片按 100% 宽自适应缩放，百分比与它天然同源；
   而 --u 是脚本量出来的，受滚动条、缩放、缓存影响时会产生 1px 级错位，
   图片区域一旦错位就会露出底板原本的边缘。 */
.rect {
  position: absolute;
  left: calc(var(--x, 0) / var(--dw) * 100%);
  top: calc(var(--y, 0) / var(--dh) * 100%);
  width: calc(var(--w, 0) / var(--dw) * 100%);
  height: calc(var(--h, 0) / var(--dh) * 100%);
  font-size: calc(var(--u) * var(--fz, 16));
  letter-spacing: calc(var(--u) * var(--ls, 0));
}

/* 单行文本：纵向居中、横向靠左。
   PSD 文字层的 bbox 就是文字的墨迹范围，所以左对齐才能对齐设计稿；
   纵向居中则用来吸收不同系统字体 1~2px 的行高差异。
   line-height:1 让行盒等于字号，居中的是文字本身而不是"字号 + 上下行距"。 */
.mid {
  display: flex;
  align-items: center;
  line-height: 1;
  margin: 0;
}
/* 多行块：纵向排列并整体居中（内容用元素分行，不要用 <br>，flex 会多算一行） */
.mid-col { display: flex; flex-direction: column; justify-content: center; }

/* 只在某一端出现。用 !important 保证不被组件的 display 覆盖。 */
@media (max-width: 900px) { .only-pc { display: none !important; } }
@media (min-width: 901px) { .only-m { display: none !important; } }

/* ==========================================================================
   5. 舞台、底板与文本层
   ========================================================================== */
.stage {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--c-bg);
}

.stage__bg,
.stage__bg img { display: block; width: 100%; }
.stage__bg img { height: auto; }

/* 文本层：整层不接收鼠标事件，好让底板上的元素可以点到；
   需要交互的元素（链接 / 按钮 / 轮播容器）单独打开。 */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.overlay a,
.overlay button,
.overlay .is-interactive { pointer-events: auto; }

.overlay img { pointer-events: none; }

/* ==========================================================================
   6. 入场动画
   默认全部可见；只有脚本确认可用（html.is-js）才隐藏后入场。
   这样脚本 404、被拦截、报错时，文字永远不会变成空白。
   ========================================================================== */
.reveal { opacity: 1; }

html.is-js .reveal {
  opacity: 0;
  transform: translate3d(0, calc(var(--u) * 26), 0);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

html.is-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 同组元素错峰，最多 4 档 */
html.is-js .reveal--d1 { transition-delay: .12s; }
html.is-js .reveal--d2 { transition-delay: .24s; }
html.is-js .reveal--d3 { transition-delay: .36s; }
html.is-js .reveal--d4 { transition-delay: .48s; }

/* 首屏 KV 的柔和扫光 */
.kv__glow {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .2) 50%, transparent 70%);
  animation: sweep 7s ease-in-out infinite;
}

@keyframes sweep {
  0%, 100% { transform: translateX(-45%); opacity: 0; }
  35%      { opacity: .8; }
  65%      { transform: translateX(45%); opacity: 0; }
}

/* ==========================================================================
   7. 浮动 UI
   ========================================================================== */
/* 阅读进度条 */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 80;
  pointer-events: none;
}

.progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4aa8ff, #fff, #ffd88a);
  box-shadow: 0 0 10px rgba(120, 195, 255, .9);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 55;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: rgba(8, 36, 92, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 20px;
  opacity: 0;
  transform: translateY(14px) scale(.9);
  pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease), background .3s;
}

.to-top.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover { background: rgba(30, 96, 190, .95); transform: translateY(-3px); }

@media (max-width: 900px) {
  .to-top { right: 14px; bottom: 20px; width: 40px; height: 40px; }
}

/* 文字弹层：原生 <dialog>，聚焦陷阱、Esc 关闭由浏览器负责 */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: min(760px, 88vw);
  max-height: 80vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-white);
}

.dialog::backdrop {
  background: rgba(3, 14, 40, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dialog__panel {
  position: relative;
  max-height: 80vh;
  overflow: auto;
  padding: 34px 38px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: linear-gradient(150deg, #12458f, #0a2a68);
  line-height: 1.9;
}

.dialog__close {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  font-size: 20px;
  transition: background .3s, transform .3s;
}

.dialog__close:hover { background: rgba(255, 255, 255, .3); transform: scale(1.08); }

.dialog__body h3 { margin: 0 0 14px; font-size: 22px; letter-spacing: .04em; }
.dialog__body p { margin: 0 0 14px; font-size: 15px; color: var(--c-text-86); }
.dialog__body .dialog__meta { font-size: 13px; opacity: .7; }

@media (max-width: 900px) {
  .dialog__panel { padding: 26px 22px; }
}

/* 弹层打开时锁定页面滚动 */
body.is-locked { overflow: hidden; }

/* ==========================================================================
   8. 降级与动效偏好
   ========================================================================== */
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .to-top,
  .dialog__close { background: rgba(7, 30, 78, .96); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  html.is-js .reveal { opacity: 1; transform: none; }
}
