/* 字体：改成放在本地 resources/static/fonts/ 里自托管。
   原来这里是从 fonts.googleapis.com @import 的，那是「渲染阻塞」的：
   网一慢或连不上，浏览器会一直等这个 CSS 才肯画第一帧，
   结果就是整页空白（连文字都没有）。自托管以后完全不依赖网络。 */
@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  font-display: swap;              /* 字体没到时先用后备字体显示文字，不挡渲染 */
  src: url('fonts/pacifico-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/pacifico-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html, body {
  margin: 0;
  min-height: 100%;

  /* 默认字体。不写这条的话，中文会落到各浏览器自己的默认字体上：
     Safari 用宋体、Chrome 用苹方，同一个页面两个浏览器长得完全不一样。
     这里显式点名 —— 拉丁字母走系统 UI 字体，中文走苹方（就是你要的那个样子）。
     换成微软雅黑是为了 Windows 上也不掉回宋体。 */
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #99a2cd 0%, #acc9e0 100%);
  background-attachment: fixed; /* 可选：滚动时渐变固定 */
}

/* 本页标题栏：Wuki AI 和 架构 一行并排，整组居中 */
.titleBar {
  display: flex;
  flex-direction: row;      /* 一行并排 */
  align-items: center;      /* 垂直居中 */
  justify-content: center;  /* 整组水平居中 */
  height: 56px;
  /* 观感补偿：Wuki AI 又宽又是手写体，整组居中时它正好压在中线上，
     看着只有它居中、架构 像挂在右边。右边多留 24px，整组就向左偏 12px
     （偏移量 = 左右内边距之差 ÷ 2），两段到中线的距离就拉平了。
     想调大/调小就改右边这个数，想往右偏就把两个数对调。 */
  padding: 0 40px 0 16px;
  gap: 12px;                /* 两个元素之间的间距，不加会贴在一起 */
  background: #44c6982f;
  border-bottom: 3px solid #51c5d72c;
  box-sizing: border-box;

  /* 钉在顶部：页面往下滚时标题栏不跟着上去，一直贴在窗口最上面 */
  position: sticky;
  top: 0;
  z-index: 10;                        /* 盖住下面滚上来的内容 */
  backdrop-filter: blur(8px);         /* 底色是半透明的，不模糊的话下面的字会透出来 */
  -webkit-backdrop-filter: blur(8px); /* Safari 要加前缀 */
}

/* 标题栏里的 h3（架构）：呆萌手写体（站酷快乐体） */
.titleBar h3 {
  margin: 0;
  font-family: 'ZCOOL KuaiLe', 'PingFang SC', 'Heiti SC', sans-serif;
  font-weight: 400;   /* 站酷快乐体只有一档字重，h3 默认的 bold 会被浏览器「伪加粗」，把圆滚滚的笔画糊掉 */
  font-size: 22px;    /* 原来默认是 18.7px 粗体，改成常规字重后调大一点，才压得住旁边的 Wuki AI */
}

.titleBar_title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #3649db;
  font-family: 'Pacifico', cursive;
}

/* ================= 标题栏入场编排（配 aboutArchScript.js）=================
   顺序：Wuki AI 先在正中升起 → 0.35s 后 架构 在原地升起 → 最后 Wuki AI
   非线性地滑到现在的位置。两个位置的差由脚本量好后放进 --shift。 */

/* 脚本在 <head> 里同步给 <html> 加了 .js。编排还没开始时（没有 .choreo）：
   - 把两个标题藏起来，免得先按最终位置闪一下；
   - 顺手关掉 .title 自带的那遍 riseUp —— 动画的值会盖过 opacity，
     不关掉的话它在脚本量好距离之前就先跑完了。 */
.js .titleBar:not(.choreo) .titleBar_title,
.js .titleBar:not(.choreo) h3 {
  opacity: 0;
}

.js .titleBar:not(.choreo) .titleBar_title {
  animation: none;
}

/* 脚本量好距离、加上 .choreo 之后，动画才开始跑 */
.titleBar.choreo .titleBar_title {
  animation: wukiEnter 2s both;
}

/* 架构：和 Wuki AI 完全一样的 riseUp，只是等 0.35s 再开始 */
.titleBar.choreo h3 {
  animation: riseUp 0.9s ease-out 0.4s both;
}

/* Wuki AI 的专属动画：升起来的位置是正中，最后再非线性地滑到最终位置。
   每个关键帧可以单独写 animation-timing-function，所以「升起」和「平移」
   可以用两条不同的缓动曲线。 */
@keyframes wukiEnter {
  0% {
    /* 从正中下方 60px 处升起；--shift 就是「正中」相对「最终位置」的偏移 */
    opacity: 0;
    transform: translate(var(--shift, 0px), 60px);
    animation-timing-function: ease-out;
  }
  45% {
    /* 0.90s：升到正中（和 架构 的 riseUp 同样的时长与缓动） */
    opacity: 1;
    transform: translate(var(--shift, 0px), 0);
    animation-timing-function: linear;
  }
  65% {
    /* 1.30s：在正中停一下，等 架构 落位。
       这里的缓动只管下一段（平移），换成非线性曲线 */
    transform: translate(var(--shift, 0px), 0);
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  100% {
    /* 2.00s：非线性地滑到现在的位置 */
    transform: translate(0, 0);
  }
}

.titleBar_sidebar {
  width: 240px;          /* 栏宽 */
  flex: 0 0 240px;       /* 固定宽度，不伸缩 */
  height: 100vh;         /* 满屏高 */
  background: #6026e8;
  padding: 16px;
  box-sizing: border-box;

  position: sticky;      /* 页面滚动时侧栏固定 */
  top: 0;
}

.titleBar_back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);   /* 和标题栏文字对齐到同一条中线上 */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  color: #3649db;
  font-family: 'ZCOOL KuaiLe', 'PingFang SC', 'Heiti SC', sans-serif;
  font-weight: 400;              /* 站酷快乐体只有一档字重，写 bold 会被伪加粗 */
  font-size: 16px;
  line-height: 1;
  text-decoration: none;         /* 链接默认的下划线不要 */
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.titleBar_content {
  flex: 1;               /* 占满剩余宽度 */
  padding: 16px;
}

.title {
  font-weight: bold;
  color: #fff;
  letter-spacing: 4px;
  animation: riseUp 1.2s ease-out both;
}

@keyframes riseUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rUp {
  animation: riseUp 2.0s ease-out 0.9 both;
}

/* 返回链接 */
.backRow {
  text-align: center;
  margin: 24px 0;
}

.backLink {
  color: #3649db;
  font-weight: bold;
  text-decoration: none;
}

.backLink:hover {
  text-decoration: underline;
}