/* =========================================================
   案例页（Case）—— 项目点开后的电影感叙事层
   与主站的 deck 图集并存：deck 降级为「看原稿」，case 是主入口。
   基调：近黑底 + 单一项目色 + letterbox 遮幅 + 长缓动
   ========================================================= */

.case {
  position: fixed;
  inset: 0;
  /* 主站层级：loader 9500 / toast 9300 / cursor 9200 / deck 9100 / grain 9000
     / nav 8000 / totop 7500。案例层要盖住 nav，但让胶片颗粒(grain) 留在上面。 */
  z-index: 8600;
  background: var(--cs-ink, #07090c);
  color: var(--cs-paper, #eceae5);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
  /* 项目色由 JS 下发 --proj */
  --proj: #e1251b;
  --cs-ink: #07090c;
  --cs-ink-2: #0d1116;
  --cs-paper: #eceae5;
  --cs-dim: rgba(236, 234, 229, .58);
  --cs-faint: rgba(236, 234, 229, .3);
  --cs-line: rgba(236, 234, 229, .14);
  --bar: clamp(18px, 3.4vh, 40px);
}

.case.is-open { opacity: 1; visibility: visible; }

/* 滚动条藏掉，交互靠滚轮与键盘 */
.case { scrollbar-width: none; }
.case::-webkit-scrollbar { display: none; }

/* ---------- 遮幅：上下两条黑边，进场时压下来 ---------- */
.case__bars { position: fixed; inset: 0; pointer-events: none; z-index: 8; }

.case__bars i {
  position: absolute;
  left: 0; right: 0;
  height: var(--bar);
  background: #000;
  transform: scaleY(0);
  transition: transform 1.1s var(--ease);
}

.case__bars i:first-child { top: 0; transform-origin: top; }
.case__bars i:last-child { bottom: 0; transform-origin: bottom; }
.case.is-open .case__bars i { transform: scaleY(1); }

/* ---------- 顶栏 ---------- */
.case__top {
  position: fixed;
  top: var(--bar);
  left: 0; right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cs-dim);
  background: linear-gradient(to bottom, rgba(7, 9, 12, .82), rgba(7, 9, 12, 0));
  backdrop-filter: blur(6px);
}

.case__slug { display: flex; align-items: center; gap: 10px; min-width: 0; }
.case__slug b { color: var(--proj); font-weight: 500; }
.case__slug span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.case__tools { display: flex; align-items: center; gap: 8px; justify-self: end; }

.case__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-paper);
  white-space: nowrap;
  cursor: pointer;
  transition: background .35s var(--ease), border-color .35s, color .35s;
}

.case__btn:hover { background: var(--proj); border-color: var(--proj); color: #fff; }
.case__btn--solid { background: var(--cs-paper); border-color: var(--cs-paper); color: var(--cs-ink); }
.case__btn--solid:hover { background: var(--proj); border-color: var(--proj); color: #fff; }

/* 场号计数（中间） */
.case__sc { justify-self: center; color: var(--cs-faint); }
.case__sc b { color: var(--cs-paper); font-weight: 500; }

/* 顶部进度线 */
.case__prog {
  position: fixed;
  top: var(--bar);
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--proj);
  z-index: 11;
}

/* ---------- 通用节 ---------- */
.cs {
  position: relative;
  padding-inline: clamp(18px, 5vw, 96px);
}

.cs__in { width: 100%; max-width: 1560px; margin-inline: auto; }

/* 场记板式的小标题 */
.cs__slate {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cs-faint);
  margin-bottom: clamp(18px, 3vh, 34px);
}

.cs__slate b { color: var(--proj); font-weight: 500; }
.cs__slate i { flex: 1; height: 1px; background: var(--cs-line); font-style: normal; }

/* 标题文字的擦除式入场（像片头字卡） */
.wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.15s var(--ease);
  transition-delay: var(--d, 0ms);
}

.wipe.is-in { clip-path: inset(0 0 0 0); }

.rise2 {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.rise2.is-in { opacity: 1; transform: none; }

/* ---------- 01 英雄区 ---------- */
.cs-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding-bottom: clamp(46px, 11vh, 120px);
  padding-top: calc(var(--bar) + 80px);
  overflow: clip;
}

.cs-hero__bg {
  position: absolute;
  inset: calc(var(--bar) * -1) 0;
  z-index: 0;
  overflow: clip;
}

.cs-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 电影调色：压暗 + 降饱和，让红色更跳 */
  filter: saturate(.72) contrast(1.06) brightness(.52);
  transform: scale(1.08) translate3d(0, 0, 0);
  will-change: transform;
}

/* 暗角 + 底部压黑，保证标题可读 */
.cs-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 30%, rgba(7, 9, 12, .55) 78%, rgba(7, 9, 12, .9) 100%),
    linear-gradient(to top, var(--cs-ink) 4%, rgba(7, 9, 12, .5) 34%, rgba(7, 9, 12, .1) 62%);
}

.cs-hero__in { position: relative; z-index: 2; }

.cs-hero__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cs-dim);
  margin-bottom: 18px;
}

.cs-hero__kicker s { width: 34px; height: 1px; background: var(--proj); text-decoration: none; }

.cs-hero__title {
  font-family: var(--ff-display);
  font-size: clamp(58px, 15vw, 300px);
  line-height: .82;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0;
}

/* 逐字入场 */
.cs-hero__title span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1.05s var(--ease), opacity .7s ease;
  transition-delay: calc(var(--i, 0) * 46ms + 220ms);
}

.case.is-open .cs-hero__title span { transform: none; opacity: 1; }

.cs-hero__rule {
  height: 3px;
  background: var(--proj);
  margin: clamp(16px, 3vh, 30px) 0 clamp(14px, 2.4vh, 26px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.3s var(--ease) .5s;
}

.case.is-open .cs-hero__rule { transform: scaleX(1); }

.cs-hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 48px);
}

.cs-hero__cn {
  font-size: clamp(15px, 1.5vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  max-width: 30em;
  color: var(--cs-paper);
}

.cs-hero__meta {
  display: grid;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cs-dim);
  text-align: right;
}

.cs-hero__meta b { color: var(--proj); font-weight: 500; }

/* 居中贴底：左边是中文副标题、右边是 meta，中间这条竖线正好空着 */
.cs-hero__scroll {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bar) + 8px);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cs-faint);
  pointer-events: none;
}

.cs-hero__scroll i {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--proj), transparent);
  animation: csDrop 1.9s var(--ease-io) infinite;
}

@keyframes csDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 02 一句话主张 ---------- */
.cs-log { padding-block: clamp(70px, 16vh, 190px); }

.cs-log__p {
  font-size: clamp(22px, 3.4vw, 58px);
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: -.01em;
  max-width: 26em;
}

.cs-log__p em { font-style: normal; color: var(--proj); }

/* 按词入场 */
.cs-log__p span {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em);
  transition: opacity .8s ease, transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 34ms);
}

.cs-log__p.is-in span { opacity: 1; transform: none; }

/* ---------- 03 关键数据 ---------- */
.cs-facts { padding-bottom: clamp(60px, 12vh, 140px); }

.cs-facts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 1px solid var(--cs-line);
}

.cs-fact {
  padding: clamp(18px, 3vh, 34px) clamp(14px, 2vw, 30px);
  border-bottom: 1px solid var(--cs-line);
  border-right: 1px solid var(--cs-line);
}

.cs-fact:last-child { border-right: 0; }

.cs-fact__k {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cs-faint);
  margin-bottom: 10px;
}

.cs-fact__v { font-size: clamp(15px, 1.3vw, 19px); font-weight: 600; line-height: 1.45; }

/* ---------- 04 场景：产品浮在画面上，视差 ---------- */
.cs-scene { position: relative; padding-block: clamp(40px, 8vh, 90px); }

.cs-scene__stage {
  position: relative;
  border-radius: 3px;
  overflow: clip;
  background: var(--cs-ink-2);
  aspect-ratio: 16 / 9;
}

.cs-scene__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8) brightness(.86);
  transform: scale(1.12);
  will-change: transform;
}

/* 画面可能是亮雪面，文字区要自带压暗，否则白字读不出来 */
.cs-scene__stage::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(7, 9, 12, .88) 0%, rgba(7, 9, 12, .55) 38%, rgba(7, 9, 12, 0) 100%);
}

.cs-scene__cap {
  position: absolute;
  left: clamp(16px, 3vw, 46px);
  bottom: clamp(16px, 3vh, 42px);
  z-index: 2;
  max-width: 28em;
}

.cs-scene__cap p { text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }

.cs-scene__cap h3 {
  font-family: var(--ff-display);
  font-size: clamp(24px, 3.4vw, 54px);
  line-height: .96;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cs-scene__cap p {
  font-size: clamp(13px, 1.05vw, 16px);
  color: rgba(236, 234, 229, .82);
  line-height: 1.6;
}

/* 场景左上角的时间码装饰 */
.cs-scene__tc {
  position: absolute;
  top: clamp(12px, 2vh, 26px);
  left: clamp(16px, 3vw, 46px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .72);
}

.cs-scene__tc s {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--proj);
  text-decoration: none;
  animation: csRec 1.6s steps(1) infinite;
}

@keyframes csRec { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }

/* ---------- 05 浮层产品（抠图 PNG）---------- */
.cs-float {
  position: relative;
  padding-block: clamp(70px, 15vh, 180px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 5vw, 90px);
  align-items: center;
}

.cs-float--flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.cs-float--flip .cs-float__txt { order: 2; }

.cs-float__media { position: relative; }

.cs-float__media img {
  display: block;
  width: auto;
  max-width: 100%;
  /* 竖构图（如爆炸图 1834x2200）满宽会超出视口，用视口高度封顶 */
  max-height: 82svh;
  height: auto;
  margin-inline: auto;
  /* 抠图件自带 alpha，用投影托住，不要再加底板 */
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55));
  will-change: transform;
}

.cs-float__glow {
  position: absolute;
  inset: 8% 4%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%,
    color-mix(in srgb, var(--proj) 34%, transparent), transparent 72%);
  filter: blur(46px);
}

.cs-float__txt h3 {
  font-size: clamp(20px, 2.3vw, 38px);
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 16px;
}

.cs-float__txt p { font-size: clamp(13px, 1.05vw, 16.5px); color: var(--cs-dim); line-height: 1.75; }

.cs-float__list {
  margin-top: clamp(18px, 3vh, 30px);
  display: grid;
  gap: 10px;
}

.cs-float__list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 14px;
  color: var(--cs-paper);
  padding-block: 9px;
  border-top: 1px solid var(--cs-line);
}

.cs-float__list li b {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--proj);
  letter-spacing: .1em;
  padding-top: 3px;
}

/* ---------- 06 UI 屏组：横向漂移 ---------- */
.cs-ui { padding-block: clamp(50px, 11vh, 130px); overflow: clip; }

.cs-ui__row {
  display: flex;
  gap: clamp(14px, 2vw, 34px);
  align-items: flex-end;
  will-change: transform;
}

.cs-ui__row img {
  flex: none;
  width: clamp(128px, 15vw, 230px);
  height: auto;
  border-radius: 14px;
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, .6));
}

.cs-ui__wide { margin-top: clamp(22px, 4vh, 52px); }

/* 界面稿常是近方形的，满宽会比视口还高，只能看到一条切片。
   所以用视口高度封顶，宽度自适应居中。 */
.cs-ui__wide img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 78svh;
  height: auto;
  margin-inline: auto;
  border-radius: 4px;
  border: 1px solid var(--cs-line);
}

/* ---------- 07 满幅环境板 ---------- */
.cs-plate {
  position: relative;
  height: clamp(320px, 78svh, 780px);
  margin-block: clamp(40px, 9vh, 110px);
  overflow: clip;
}

.cs-plate img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: saturate(.62) contrast(1.08) brightness(.6);
  will-change: transform;
}

.cs-plate__q {
  position: absolute;
  inset: auto clamp(18px, 6vw, 120px) clamp(30px, 7vh, 90px);
  z-index: 2;
  font-family: var(--ff-display);
  font-size: clamp(26px, 5.2vw, 90px);
  line-height: .98;
  text-transform: uppercase;
  max-width: 18em;
}

.cs-plate__q em { font-style: normal; color: var(--proj); }

/* ---------- 08 收尾 ---------- */
.cs-end {
  padding-block: clamp(70px, 15vh, 170px) clamp(60px, 12vh, 140px);
  border-top: 1px solid var(--cs-line);
}

.cs-end__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cs-end__hint {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cs-faint);
}

.cs-nav {
  margin-top: clamp(30px, 6vh, 70px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--cs-line);
}

.cs-nav__a {
  display: grid;
  gap: 8px;
  padding: clamp(18px, 3.4vh, 38px) clamp(16px, 2.4vw, 34px);
  background: var(--cs-ink);
  cursor: pointer;
  text-align: left;
  transition: background .4s var(--ease);
}

.cs-nav__a:last-child { text-align: right; }
.cs-nav__a:hover { background: var(--cs-ink-2); }

.cs-nav__k {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cs-faint);
}

.cs-nav__n {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2.6vw, 42px);
  line-height: 1;
  text-transform: uppercase;
}

.cs-nav__a:hover .cs-nav__n { color: var(--proj); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cs-float,
  .cs-float--flip { grid-template-columns: 1fr; gap: 26px; }
  .cs-float--flip .cs-float__txt { order: 0; }
  .cs-hero__meta { text-align: left; }
  .cs-facts__grid { grid-template-columns: 1fr 1fr; }
  .cs-fact:nth-child(2n) { border-right: 0; }
  .case__sc { display: none; }
}

@media (max-width: 560px) {
  .cs-facts__grid { grid-template-columns: 1fr; }
  .cs-fact { border-right: 0; }
  .cs-scene__stage { aspect-ratio: 4 / 5; }
  .cs-nav { grid-template-columns: 1fr; }
  .cs-nav__a:last-child { text-align: left; }
}

/* ---------- 降级：尊重系统的减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .case, .case * { transition-duration: .01ms !important; animation: none !important; }
  .wipe { clip-path: none; }
  .rise2 { opacity: 1; transform: none; }
  .cs-hero__title span { transform: none; opacity: 1; }
  .cs-log__p span { opacity: 1; transform: none; }
  .cs-hero__rule { transform: scaleX(1); }
  .case__bars i { transform: scaleY(1); }
}

/* ---------- 图组：抠图件 / 照片板两套观感 ---------- */
.cs-grid { padding-block: clamp(50px, 11vh, 130px); }

.cs-grid__h {
  font-size: clamp(20px, 2.3vw, 38px);
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 14px;
}

.cs-grid__p {
  max-width: 44em;
  color: var(--cs-dim);
  line-height: 1.75;
  font-size: clamp(13px, 1.05vw, 16.5px);
  margin-bottom: clamp(24px, 5vh, 54px);
}

.cs-grid__row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 40px);
  align-items: end;
}

.cs-grid__it { margin: 0; }

.cs-grid__it img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--cs-line);
}

.cs-grid__it figcaption {
  margin-top: 12px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-faint);
}

/* 抠图件：不要边框，用投影托住 */
.cs-grid--cut .cs-grid__it img {
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 30px 44px rgba(0, 0, 0, .55));
}

@media (max-width: 760px) {
  .cs-grid__row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .cs-grid__row { grid-template-columns: 1fr; }
}

/* =========================================================
   大层面交互：钉住转台 / 钉住横向展廊 / 流程可视化
   进度由 JS 写在区块的 --p 上（0~1）
   ========================================================= */

/* ---------- 转台：钉一屏，滚动换角度 ---------- */
.cs-turn {
  position: relative;
  /* 每个角度给约 0.85 屏的滚动行程 */
  height: calc(100svh * (0.85 * var(--n, 4) + 1));
}

.cs-turn__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: center;
  overflow: clip;
}

.cs-turn__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 5vw, 90px);
  align-items: center;
}

.cs-turn__stage {
  position: relative;
  height: min(70svh, 620px);
}

.cs-turn__stage img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  opacity: 0;
  transform: scale(.965) rotate(-1.2deg);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .6));
  transition: opacity .7s var(--ease), transform 1s var(--ease);
}

.cs-turn__stage img.is-on { opacity: 1; transform: none; }

.cs-turn__dots {
  margin-top: clamp(18px, 3vh, 32px);
  display: grid;
  gap: 2px;
}

.cs-turn__dots li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 11px;
  border-top: 1px solid var(--cs-line);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-faint);
  transition: color .45s var(--ease);
}

.cs-turn__dots li i {
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: width .55s var(--ease), background .45s;
}

.cs-turn__dots li.is-on { color: var(--cs-paper); }
.cs-turn__dots li.is-on i { width: 52px; background: var(--proj); }

/* ---------- 钉住横向展廊 ---------- */
.cs-hs {
  position: relative;
  height: 320svh;
}

.cs-hs__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: center;
  gap: clamp(20px, 4vh, 44px);
  overflow: clip;
}

.cs-hs__head { width: 100%; }

.cs-hs__track {
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 54px);
  padding-inline: clamp(18px, 5vw, 96px);
  will-change: transform;
}

.cs-hs__it { flex: none; margin: 0; }

.cs-hs__it img {
  display: block;
  width: auto;
  height: min(58svh, 520px);
  filter: drop-shadow(0 30px 46px rgba(0, 0, 0, .62));
}

.cs-hs__it figcaption {
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cs-faint);
}

/* ---------- 流程可视化（纯 SVG，无位图） ---------- */
.cs-flow { padding-block: clamp(60px, 13vh, 150px); }

.cs-flow__svg {
  width: 100%;
  height: auto;
  max-width: 1180px;
  margin-top: clamp(14px, 3vh, 30px);
  overflow: visible;
}

.cs-flow__rail { stroke: var(--cs-line); stroke-width: 1; }

/* 主线随入场画出来 */
.cs-flow__live {
  stroke: var(--proj);
  stroke-width: 2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.8s var(--ease) .1s;
}

.cs-flow.is-in .cs-flow__live { stroke-dashoffset: 0; }

.cs-flow__n {
  opacity: 0;
  transition: opacity .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 300ms + 320ms);
}

.cs-flow.is-in .cs-flow__n { opacity: 1; }

.cs-flow__ring { fill: var(--cs-ink); stroke: var(--cs-line); stroke-width: 1; }
.cs-flow__dot { fill: var(--proj); }

.cs-flow__cn {
  fill: var(--cs-paper);
  font-family: var(--ff-sans);
  font-size: 19px;
  font-weight: 600;
  text-anchor: middle;
}

.cs-flow__en,
.cs-flow__no {
  fill: rgba(236, 234, 229, .42);
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-anchor: middle;
}

.cs-flow__no { fill: var(--proj); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cs-turn { height: calc(100svh * (0.7 * var(--n, 4) + 1)); }
  .cs-turn__grid { grid-template-columns: 1fr; gap: 20px; }
  .cs-turn__stage { height: min(46svh, 380px); }
  .cs-hs { height: 280svh; }
  .cs-hs__it img { height: min(44svh, 400px); }
  .cs-flow__cn { font-size: 26px; }
  .cs-flow__en, .cs-flow__no { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  /* 不做钉住效果：还原成普通竖排，滚动即可看完 */
  .cs-turn, .cs-hs { height: auto; }
  .cs-turn__pin, .cs-hs__pin { position: static; height: auto; padding-block: 40px; }
  .cs-turn__stage { height: auto; display: grid; gap: 20px; }
  .cs-turn__stage img { position: static; opacity: 1; transform: none; margin: 0; }
  .cs-hs__track { flex-wrap: wrap; transform: none !important; }
  .cs-flow__live { stroke-dashoffset: 0; }
  .cs-flow__n { opacity: 1; }
}

/* =========================================================
   视觉冲击层：雪幕 / 标题穿透 / 热成像扫描 / 探照灯
   ========================================================= */

/* ---------- 雪幕：全局环境层 ---------- */
.case__snow {
  position: fixed;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .62;
}

/* ---------- 标题穿透：机身夹在前后两层字之间 ---------- */
.cs-hero__stack { position: relative; }

.cs-hero--pierce .cs-hero__stack {
  /* 给机身留出向上溢出的空间，桨臂可以探到标题上方 */
  padding-top: clamp(40px, 12vh, 150px);
  margin-top: clamp(-40px, -12vh, -150px);
}

.cs-hero__craft {
  position: absolute;
  z-index: 2;
  /* 必须和标题横向交叠，否则「穿透」看不出来 */
  left: 28%;
  bottom: -12%;
  width: clamp(300px, 44vw, 860px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .7));
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform;
}

/* 前层标题只留下半截，于是机身「穿过」字，而不是压在字上 */
.cs-hero__title--front {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: block;
  font-family: var(--ff-display);
  font-size: clamp(58px, 15vw, 300px);
  line-height: .82;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--cs-paper);
  /* 只画字的下半截，盖在机身上 —— 于是机身像从字缝里穿出来 */
  clip-path: inset(50% 0 0 0);
  pointer-events: none;
}

.cs-hero__title--front span { transform: none; opacity: 1; }

@media (max-width: 900px) {
  /* 窄屏机身会把字压死，缩小并移到右侧 */
  .cs-hero__craft { width: 62vw; left: 52%; bottom: -2%; }
  .cs-hero__title--front { clip-path: inset(62% 0 0 0); }
}

/* ---------- 热成像扫描 ---------- */
.cs-therm {
  position: relative;
  height: 300svh;
}

.cs-therm__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: center;
  gap: clamp(16px, 3vh, 34px);
  padding-inline: clamp(18px, 5vw, 96px);
  overflow: clip;
}

.cs-therm__head { padding-inline: 0; }

.cs-therm__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  max-height: 62svh;
  overflow: clip;
  border-radius: 3px;
  background: #05070a;
}

.cs-therm__base,
.cs-therm__hot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-therm__base { filter: saturate(.55) brightness(.72) contrast(1.05); }

/* 伪彩：灰度打底再上橙，做出热成像的观感 */
/* 伪彩别调太狠，saturate 给到 7 会烧成岩浆，读不出是热成像 */
.cs-therm__hot {
  filter: grayscale(1) contrast(1.32) brightness(.98)
          sepia(1) hue-rotate(-18deg) saturate(4.2);
  /* 按进度从左往右揭示 */
  clip-path: inset(0 calc(100% - var(--p, 0) * 100%) 0 0);
}

/* 扫描线 */
.cs-therm__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--p, 0) * 100%);
  width: 2px;
  z-index: 3;
  background: linear-gradient(to bottom,
    transparent, #ffb066 12%, #fff 50%, #ffb066 88%, transparent);
  box-shadow: 0 0 26px 6px rgba(255, 140, 60, .55);
  opacity: calc(1 - max(0, var(--p, 0) - .97) * 30);
}

/* 热源标记 */
.cs-therm__mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 4;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .5s var(--ease);
}

.cs-therm__mark.is-on { opacity: 1; }

.cs-therm__mark s {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ff7a1a;
  background: rgba(255, 122, 26, .3);
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(255, 122, 26, .55);
  animation: csPing 1.8s var(--ease-io) infinite;
}

.cs-therm__mark.is-on s { animation-play-state: running; }

@keyframes csPing {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .5); }
  100% { box-shadow: 0 0 0 26px rgba(255, 122, 26, 0); }
}

.cs-therm__mark em {
  font-style: normal;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ffd8b0;
  white-space: nowrap;
  padding: 3px 8px;
  background: rgba(10, 6, 2, .72);
  border-radius: 2px;
}

/* HUD */
.cs-therm__hud {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(12px, 2vw, 26px);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(5, 7, 10, .9), transparent);
  color: var(--cs-faint);
}

.cs-therm__mode { transition: color .4s var(--ease); }
.cs-therm__mode--hot { color: #ff8a3c; }
.cs-therm__pct { margin-left: auto; color: var(--cs-paper); }

/* ---------- 探照灯 ---------- */
.cs-spot {
  position: relative;
  height: 260svh;
}

.cs-spot__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
  background: #04060a;
  cursor: crosshair;
}

/* 只有光斑范围内能看见画面 */
.cs-spot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) brightness(.95);
  --r: clamp(150px, 22vw, 340px);
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 46%),
    #000 0%, #000 52%, rgba(0, 0, 0, .35) 76%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 46%),
    #000 0%, #000 52%, rgba(0, 0, 0, .35) 76%, transparent 100%);
  transition: filter .5s var(--ease);
}

.cs-spot__pin.is-hunting .cs-spot__img { filter: saturate(.85) brightness(1.06); }

/* 光斑边缘的冷光 */
.cs-spot__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle clamp(160px, 24vw, 380px)
    at var(--mx, 50%) var(--my, 46%),
    rgba(150, 200, 255, .13) 0%, transparent 70%);
}

.cs-spot__txt {
  position: relative;
  z-index: 3;
  height: 100%;
  display: grid;
  align-content: center;
  pointer-events: none;
  padding-inline: clamp(18px, 5vw, 96px);
}

.cs-spot__h {
  font-family: var(--ff-display);
  font-size: clamp(30px, 6vw, 108px);
  line-height: .96;
  text-transform: uppercase;
  max-width: 16em;
  margin-bottom: 16px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .8);
}

.cs-spot__h em { font-style: normal; color: var(--proj); }

.cs-spot__hint {
  margin-top: clamp(18px, 4vh, 40px);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cs-faint);
}

@media (max-width: 900px) {
  .cs-therm { height: 240svh; }
  .cs-therm__frame { aspect-ratio: 4 / 3.4; }
  .cs-spot { height: 200svh; }
}

/* ---------- 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .case__snow { display: none; }
  .cs-therm, .cs-spot { height: auto; }
  .cs-therm__pin, .cs-spot__pin { position: static; height: auto; padding-block: 40px; }
  /* 不做扫描：直接给出热成像结果，标记全部显示 */
  .cs-therm__hot { clip-path: inset(0 50% 0 0); }
  .cs-therm__line { display: none; }
  .cs-therm__mark { opacity: 1; }
  .cs-therm__mark s { animation: none; }
  .cs-spot__pin { cursor: auto; }
  /* 不做遮罩：整张图直接可见 */
  .cs-spot__img { -webkit-mask-image: none; mask-image: none; filter: brightness(.5); }
  .cs-spot__veil { display: none; }
  .cs-spot__txt { position: relative; padding-block: 60px; }
}
