/* ==========================================================================
   xLLM · public site — 首屏滚动叙事（/info/ 顶部）
   --------------------------------------------------------------------------
   这一层只负责"从烤炉到门口"那一段：纸色舞台、披萨分镜、深色带的接手。
   下面几节仍然是 info.css 那一套深色编辑风格，两边用 .i-story 隔开。

   两套形态：
     · 默认（没有 JS、或者 prefers-reduced-motion）—— 一张插画 + 一段标题
       + 一块深色的平台介绍，普通文档流，随便读。
     · .is-live（JS 接管）—— 舞台吸顶一屏，滚动进度驱动分镜；
       背景纸、大字、仪表盘、状态轨、深色带全部 Absolute。

   舞台里所有位移都在 story.js 里算，这里只定"在哪里、多大、什么颜色"。
   ========================================================================== */

/* 唯一的自托管字体：Anton（SIL OFL 1.1，见 static/fonts/OFL.txt）。
   只用来撑大字和深色带的标题；正文仍然走系统字体，不引 CDN、不加网络请求。 */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/anton-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;
}

:root {
  --display: "Anton", "Haettenschweiler", "Arial Narrow", Impact,
             "Helvetica Neue", Arial, sans-serif;

  /* 纸色：不用纯白，暖一点才像面粉 / 牛皮纸 */
  --paper:      #F6F0E5;
  --paper-2:    #EFE6D5;
  --paper-ink:  #17130E;
  --paper-mut:  #6E6457;
  --paper-line: rgba(23, 19, 14, .14);
  --paper-soft: rgba(23, 19, 14, .07);
  --tomato:     #E4472B;
}

.i-story {
  --edge: max(24px, calc((100vw - 1180px) / 2));

  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--paper-ink);
  /* 纸面上不要出现横向滚动条：分镜里的东西会伸出画面 */
  overflow-x: clip;
}

/* --------------------------------------------------------------------------
   舞台骨架
   -------------------------------------------------------------------------- */
.i-story__scene {
  position: relative;
  isolation: isolate;                 /* 大字要用 mix-blend-mode，别串到页面别处 */
}

.i-story__paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #FBF6EC 0%, transparent 58%),
    radial-gradient(80% 60% at 88% 90%, rgba(228, 71, 43, .05), transparent 70%),
    var(--paper);
}

.i-story__stage {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: min(70svh, 660px);
  overflow: visible;
}/* ==========================================================================
   live 形态：JS 加上 .is-live 之后才生效
   ========================================================================== */
.i-story.is-live .i-story__track {
  /* 高度由 JS 按屏高写成 --story-track；这里给个兜底 */
  height: var(--story-track, 700vh);
}

.i-story.is-live .i-story__scene {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.i-story.is-live .i-story__paper {
  position: absolute;
  inset: 0;
}

.i-story.is-live .i-story__stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 标题那块收进读屏，视觉上让给分镜 */
/* ---- 影片层 ---- */
/*
 * 两段 mp4 叠在同一个位置，只换 opacity：p ≤ 0.5 走 A 段、之后走 B 段，
 * 交界处交叉淡化。视频只 seek、不 play —— 播放会跟滚动脱节，擦洗才是"倒着滚就倒放"。
 * 没片子（或静态/减少动效形态）时这一层整个不参与布局，画面还是插画。
 */
.i-story__film { display: none; }

.i-story.is-live.has-film .i-story__film {
  display: block;
  position: absolute;
  inset: 0;
  /* 注意：这里只能是 0，不能是 1。
     大字那一层没有 z-index（为了 mix-blend-mode 不被关进 stacking context），
     它按 DOM 顺序压在影片上面；给影片一个 1 就会把大字整个盖掉。 */
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
}

.i-film__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  /* 结尾那段前端推近对着披萨放大，所以原点不在正中 */
  transform-origin: 58% 64%;
  will-change: opacity, transform;
}

/* 窄屏不启用影片（story.js 里判断），插画接管 —— 见 docs/官网滚动叙事.md */

/* 有片子的时候，插画整层让位（它只作为失败兜底） */
.i-story.has-film .i-story__stage { display: none; }

/*
 * 大字在照片上不成立：mix-blend-mode: darken 会让它被深色主体整块吃掉，
 * 主体一动字就补丁一样闪 —— 已经不是"躲在后面"，是"随机消失"。
 * 有片子的时候收掉大字：镜头本身就是主角，文字交给仪表盘和状态轨。
 */
/* 权重要和下面那条 .is-live 的一样，否则会被它盖回来 */
.i-story.is-live.has-film .i-story__words { display: none; }.i-story.has-film .i-story__rail {
  padding: 12px 18px 13px;
  border-radius: 999px;
  background: rgba(246, 240, 229, .72);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
          backdrop-filter: blur(10px) saturate(120%);
}

.i-story.has-film .i-story__hint {
  /* 状态轨变成磨砂条之后变高了，提示要往上挪，别压在上面 */
  bottom: 96px;
  text-shadow: 0 1px 10px rgba(246, 240, 229, .95), 0 0 3px rgba(246, 240, 229, .9);
}



/* ---- 大字 ---- */
.i-story.is-live .i-story__words {
  display: block;
  position: absolute;
  inset: 0;
  /* 这里不能给 z-index / transform：会建 stacking context，
     mix-blend-mode 就只跟自己的层混合，大字会盖住披萨而不是躲在后面 */
  pointer-events: none;
}

.i-word {
  position: absolute;
  left: 68%;                      /* 主角在左 36%，大字靠右，互不打架 */
  top: auto;
  bottom: 22%;                    /* 地平线：桌面端 ground = 78vh */
  transform: translate(-50%, 0);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 15.5vw, 216px);
  line-height: .78;
  letter-spacing: .005em;
  white-space: nowrap;
  color: #DCD0B6;
  /* 关键：有东西压上来时让位 —— 披萨、盒子永远赢 */
  mix-blend-mode: darken;
  will-change: transform, opacity;
  opacity: 0;
}/* 大字只在 live 形态下成立：静态形态里 .i-story__scene 就是整页（插画 + 七章），
   .i-word 的 bottom:22% 会落到正文上，字压字。 */
.i-story:not(.is-live) .i-story__words { display: none; }

/* 状态轨和滚动提示也一样：它们是绝对定位贴在舞台底部的，静态形态下没有舞台，
   掉进文档流就是七行横条压在章节和页脚之间。 */
.i-story:not(.is-live) .i-story__rail,
.i-story:not(.is-live) .i-story__hint { display: none; }

/* ---- 状态轨 ---- */
.i-story.is-live .i-story__rail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: absolute;
  z-index: 3;
  left: var(--edge);
  right: var(--edge);
  bottom: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.i-story__rail li {
  position: relative;
  flex: 1 1 0;
  padding-top: 11px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(23, 19, 14, .34);
  transition: color .25s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.i-story__rail li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 6px;
  height: 2px;
  background: rgba(23, 19, 14, .13);
  transition: background .25s var(--ease);
}
.i-story__rail li.is-on { color: var(--paper-ink); }
.i-story__rail li.is-on::before { background: var(--paper-ink); }
.i-story__rail li.i-rail__alt { flex: 0 0 auto; color: rgba(23, 19, 14, .22); }
.i-story__rail li.i-rail__alt::before { background: rgba(23, 19, 14, .07); }

/* ---- 滚动提示 ---- */
.i-story.is-live .i-story__hint {
  display: flex;
  align-items: center;
  gap: 9px;
  position: absolute;
  z-index: 3;
  right: var(--edge);
  bottom: 66px;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(23, 19, 14, .45);
  pointer-events: none;
}
.i-story__arrow {
  display: inline-block;
  animation: i-story-nudge 1.9s var(--ease) infinite;
}
@keyframes i-story-nudge {
  0%, 100% { transform: translateY(-2px); opacity: .5; }
  50%      { transform: translateY(2px);  opacity: 1; }
}

/* ---- 深色带变成整屏面板 ---- */
/* 纸色底上的按钮（深色版当初跟 still 一起被我删掉了，章节卡片还要用） */
.i-btn--ink {
  background: var(--paper-ink);
  border-color: var(--paper-ink);
  color: var(--paper);
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.i-btn--ink:hover { background: #2C241B; border-color: #2C241B; transform: translateY(-1px); }

.i-btn--ink-ghost {
  border-color: rgba(23, 19, 14, .22);
  color: var(--paper-ink);
  background: transparent;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.i-btn--ink-ghost:hover { border-color: rgba(23, 19, 14, .5); background: rgba(23, 19, 14, .04); }

/* --------------------------------------------------------------------------
   章节内容
   -------------------------------------------------------------------------- */
/*
 * 默认形态（没有 JS / 窄屏 / 减少动效）：一列普通的内容块，纵向读完。
 * live 形态下同一份 DOM 直接压在影片上 —— 没有卡片壳，靠两点保证可读：
 *   · 位置：每章的留白不一样，pos 决定它浮在哪块干净的地方；
 *   · 光晕：一层纸色 text-shadow，机器压上来时字仍然立得住。
 */
.i-chapters {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px 28px 64px;
}

.i-ch {
  padding: 26px 0 28px;
  border-top: 1px solid var(--paper-line);
}
.i-ch:first-child { border-top: 0; }

.i-ch__kicker {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(23, 19, 14, .48);
}
.i-ch__no { color: var(--paper-ink); letter-spacing: .1em; }

.i-ch__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: -.022em;
  margin: 14px 0 0;
}
.i-ch__title em { font-style: italic; color: var(--tomato); }

.i-ch__body {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(23, 19, 14, .72);
}

.i-ch__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }

/* 三端入口 */
.i-ch__roles { list-style: none; margin: 18px 0 0; padding: 0; }
.i-ch__roles li {
  position: relative;
  padding: 10px 56px 10px 0;
  border-top: 1px solid rgba(23, 19, 14, .14);
}
.i-ch__roles li:first-child { border-top: 0; }
/* 三端的标签用一颗色点带出身位，字仍然用墨色 —— 直接把 9px 的小字上成品牌色，
   压在照片上基本看不见 */
.i-ch__role-k {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(23, 19, 14, .55);
}
.i-ch__role-k::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--tint, var(--paper-ink));
  vertical-align: 1px;
}
.i-ch__role-h { display: block; margin-top: 5px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.i-ch__role-l { display: block; margin-top: 2px; font-size: 12.2px; line-height: 1.45; color: rgba(23, 19, 14, .6); }
.i-ch__roles a {
  position: absolute;
  right: 0;
  top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(23, 19, 14, .6);
  text-decoration: none;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.i-ch__roles a:hover { color: var(--tomato); transform: translateX(2px); }

/* 三条规则 */
.i-ch__rules { list-style: none; margin: 18px 0 0; padding: 0; }
.i-ch__rules li { padding: 9px 0; border-top: 1px solid rgba(23, 19, 14, .14); }
.i-ch__rules b { display: block; font-size: 14px; font-weight: 600; }
.i-ch__rules span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: rgba(23, 19, 14, .62); }

/* 七个状态 */
.i-ch__states { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.i-ch__states li {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  padding: 7px 10px;
  border: 1px solid rgba(23, 19, 14, .2);
  border-radius: 999px;
  color: rgba(23, 19, 14, .72);
  white-space: nowrap;
}

/* 四个数字：等宽四列。标签最多两行 —— 不交给自由换行，窄的时候一列能换出三行 */
.i-ch__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(23, 19, 14, .16);
}
.i-ch__stats dt { font-family: var(--display); font-size: 28px; line-height: 1; }
.i-ch__stats dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(23, 19, 14, .5);
}
.i-ch__meta { margin: 14px 0 0; font-family: var(--mono); font-size: 10.5px; color: rgba(23, 19, 14, .5); }

/* 七个状态：小圆角标签，压在照片上时给一点纸色底 —— 描边在画面里太细，
   七个挤成一行会整排糊掉 */
.i-story.is-live .i-ch__states li {
  background: rgba(246, 240, 229, .62);
  border-color: rgba(23, 19, 14, .28);
  color: rgba(23, 19, 14, .86);
}

/* 三套设计系统 */
.i-ch__systems { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.i-ch__systems li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(23, 19, 14, .66); }
.i-ch__sw { display: inline-flex; gap: 3px; }
.i-ch__sw i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(23, 19, 14, .12); }

/* ---- live：文字直接压在影片上 ---- */
.i-story.is-live .i-chapters {
  position: absolute;
  inset: 0;
  z-index: 3;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.i-story.is-live .i-ch {
  position: absolute;
  width: min(460px, 36vw);
  padding: 0;
  border-top: 0;
  pointer-events: none;
  /* 纸色光晕：紧一圈把笔画从背景里托出来，散一圈当空气，远处一圈接住薄雾。
     比加面板轻，在明亮的画面上也看不出来。 */
  text-shadow:
    0 0 3px rgba(246, 240, 229, .92),
    0 0 11px rgba(246, 240, 229, .86),
    0 0 24px rgba(246, 240, 229, .66);
}

/* 压在照片上时正文用更重的墨：纸色光晕已经把它托起来了，再淡一档就发灰 */
.i-story.is-live .i-ch__body,
.i-story.is-live .i-ch__rules span,
.i-story.is-live .i-ch__role-l { color: rgba(23, 19, 14, .82); }

/* 位置：按每一段影片的留白定。主体基本在中间偏右，所以左中、左上、左下用得最多。 */
.i-story.is-live .i-ch[data-pos="mr"] { right: var(--edge); top: 50%; transform: translateY(-50%); }
.i-story.is-live .i-ch[data-pos="ml"] { left: var(--edge); top: 50%; transform: translateY(-50%); }
.i-story.is-live .i-ch[data-pos="tr"] { right: var(--edge); top: 14vh; }
.i-story.is-live .i-ch[data-pos="br"] { right: var(--edge); bottom: 14vh; }
.i-story.is-live .i-ch[data-pos="tl"] { left: var(--edge); top: 16vh; }
.i-story.is-live .i-ch[data-pos="bl"] { left: var(--edge); bottom: 16vh; }
.i-story.is-live .i-ch[data-pos="lt"] { left: 17vw; top: 15vh; }
.i-story.is-live .i-ch[data-pos="lb"] { left: 17vw; bottom: 15vh; }

.i-story.is-live .i-ch[data-kind="intro"] .i-ch__title {
  font-size: clamp(38px, 3.6vw, 54px);
}

/*
 * 薄雾：整屏一层纸色，透明度由当前章节决定（story.js 写 --veil）。
 * 没有边界、没有模糊、没有圆角 —— 看起来是"这段画面被压亮了一点"，
 * 而不是"这里贴了一块板子"。
 */
.i-story.is-live .i-story__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.i-story.is-live .i-story__veil--l {
  background: linear-gradient(90deg,
    rgba(246, 240, 229, .97) 0%, rgba(246, 240, 229, .92) 40%,
    rgba(246, 240, 229, .55) 68%, rgba(246, 240, 229, 0) 94%);
}
.i-story.is-live .i-story__veil--r {
  background: linear-gradient(270deg,
    rgba(246, 240, 229, .97) 0%, rgba(246, 240, 229, .92) 40%,
    rgba(246, 240, 229, .55) 68%, rgba(246, 240, 229, 0) 94%);
}

/* 揭示：全部是上下运动，每章换一种。--rv 由 story.js 每帧写。 */
.i-story.is-live .i-ch [data-rv] { will-change: transform, opacity, clip-path; }

.i-story.is-live .i-ch[data-motion="rise"] [data-rv] {
  opacity: calc(var(--rv, 0));
  transform: translateY(calc((1 - var(--rv, 0)) * 26px));
}
.i-story.is-live .i-ch[data-motion="drop"] [data-rv] {
  opacity: calc(var(--rv, 0));
  transform: translateY(calc((1 - var(--rv, 0)) * -26px));
}
.i-story.is-live .i-ch[data-motion="wipe"] [data-rv] {
  opacity: 1;
  clip-path: inset(calc((1 - var(--rv, 0)) * 105%) 0 0 0);
  transform: translateY(calc((1 - var(--rv, 0)) * -10px));
}
.i-story.is-live .i-ch[data-motion="scale"] [data-rv] {
  opacity: calc(var(--rv, 0));
  transform: scale(calc(.94 + var(--rv, 0) * .06));
}

/* --------------------------------------------------------------------------
   导航在纸面上的反色
   -------------------------------------------------------------------------- */
.i-nav.is-light {
  background: rgba(246, 240, 229, .78);
  border-bottom-color: rgba(23, 19, 14, .1);
  color: var(--paper-ink);
}
.i-nav.is-light .i-brand { color: var(--paper-ink); }
.i-nav.is-light .i-brand__sub { color: rgba(23, 19, 14, .42); }
.i-nav.is-light .i-nav__links a { color: rgba(23, 19, 14, .58); }
.i-nav.is-light .i-nav__links a:hover { color: var(--paper-ink); }
.i-nav.is-light .i-nav__links a[aria-current] { color: var(--tomato); }
.i-nav.is-light .i-nav__cta {
  background: var(--paper-ink);
  border-color: var(--paper-ink);
  color: var(--paper);
}
.i-nav.is-light .i-nav__toggle { border-color: rgba(23, 19, 14, .2); }
.i-nav.is-light .i-nav__toggle span { background: var(--paper-ink); }
.i-nav.is-light .i-nav__links.is-open { background: var(--paper); }
.i-nav.is-light .i-nav__links.is-open a { color: var(--paper-ink); border-bottom-color: rgba(23,19,14,.1); }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .i-story.is-live .i-ch { width: min(380px, 44vw); padding: 22px 22px; }
  .i-story.is-live .i-ch[data-kind="intro"] { width: min(460px, 46vw); }
  .i-story__strip {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lead" "cards" "stats";
    gap: 34px;
    padding: 64px 28px 48px;
  }
  .i-story.is-live .i-story__strip { padding-top: 88px; padding-bottom: 48px; }
  .i-band__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  /* 四个数字在窄屏排成 2×2：四列 9.5px 的标签会各折成三行 */
  .i-ch__stats { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .i-story__still { padding: 0 20px 48px; }
  .i-story__stage { height: min(58svh, 460px); }
  .i-story__title { font-size: clamp(34px, 9.4vw, 48px); }
  .i-story__lede { font-size: 16px; }
  .i-story__strip { padding: 56px 20px 44px; }
  .i-story.is-live .i-story__strip { padding-top: 84px; padding-bottom: 40px; }  .i-story.is-live .i-story__rail { display: none; }
  .i-story.is-live .i-story__hint { display: none; }
  /* 手机上没地方放"贴地大字"，改成压在插画上方的一行标题 */
  .i-word {
    left: 50%;
    top: 26%;
    bottom: auto;
    font-size: clamp(44px, 13.5vw, 88px);
  }
  .i-band__title { font-size: clamp(30px, 8.4vw, 40px); }
  .i-band__copy { font-size: 12.8px; }
  .i-band__cards { grid-template-columns: minmax(0, 1fr); }
  .i-bcard { padding: 16px 16px 15px; }
  .i-bcard__b { display: none; }
  .i-band__stats { gap: 12px 30px; padding-top: 16px; }
  .i-band__stats dt { font-size: 21px; }
}

@media (max-width: 480px) {
  .i-story__actions .i-btn { flex: 1 1 auto; }
  /* 窄屏去掉学期，否则这行会折成两行，第二行只剩个 "2026/27" */
  .i-eyebrow__term { display: none; }
  .i-story.is-live .i-story__strip { padding-top: 76px; }
  .i-band__actions .i-btn--ghost { display: none; }
}

/* 减少动效：不绑滚动，插画定格，正文照常 */
@media (prefers-reduced-motion: reduce) {
  .i-story__arrow { animation: none; }
  .i-word { transition: none; }
}
