/* 演示外壳样式。每页的设计内容由 _build/build.mjs 生成为内联样式，这里只负责舞台、缩放、切换和控制条。 */

html,
body {
  margin: 0;
  height: 100%;
  background: #0b0b0b;
  overflow: hidden;
}

#deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* 每页按设计稿原始尺寸排版，再整体等比缩放到窗口内居中（--s 由 deck.js 计算） */
.slide {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--w);
  height: var(--vh);
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: center center;
  overflow: hidden;
  background: #fff;
}

.slide.is-active {
  display: block;
  animation: deck-in 0.32s ease both;
}

@keyframes deck-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 长页面：视口高度固定为一屏，内容在页内滚动 */
.slide--scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

.slide-body {
  position: relative;
  width: var(--w);
  height: var(--h);
  overflow: hidden;
  line-height: 1.5;
  font-family: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  cursor: default;
  /* TEMP 文案校对：允许选中复制；定稿检查时改回 none */
  user-select: text;
  -webkit-user-select: text;
}

/* 与 Figma 导出代码所假定的基础重置保持一致 */
.slide-body *,
.slide-body *::before,
.slide-body *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

.slide-body img {
  display: block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* TEMP 文案校对：放开指针事件以便拖选文字；定稿检查时改回 none，仅保留 .goto 可点 */
.slide-body * {
  pointer-events: auto;
}

.slide-body .goto,
.slide-body .goto * {
  pointer-events: auto;
  cursor: pointer;
}

.slide-body .goto {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.slide-body .goto:hover {
  filter: brightness(1.15) contrast(1.05);
}

/* 平时是浅灰色的导航项：移上去变为不透明 */
.slide-body .goto--solid:hover {
  opacity: 1 !important;
}

/* 设计批注「要有一个动态的引导，让客户点击」：在文字右侧加一个呼吸的小圆点 */
.slide-body .goto--hint::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 14px;
  border-radius: 50%;
  background: #b8f060;
  animation: goto-hint 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes goto-hint {
  0% { box-shadow: 0 0 0 0 rgba(184, 240, 96, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(184, 240, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 240, 96, 0); }
}

.slide-body .goto:focus-visible {
  outline: 2px solid #c9ff85;
  outline-offset: 4px;
}

/* ---------------------------------------------------------------- 客户 logo 墙（第 4 页）
   格子本身来自设计稿；格子里的 logo、行业标签由 _build/build.mjs 和 deck.js 加上。 */

/* 行业标签：沿用设计稿「品牌线上化」页里标签的样子（16px 文字 + 下划线，未选中的 30% 透明度） */
.slide-body .wall-tabs {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 27px;
}

.slide-body .wall-tab {
  appearance: none;
  -webkit-appearance: none;
  height: 29px;
  padding-bottom: 9px;
  border-bottom: 1px solid #000;
  background: none;
  color: #000;
  font: 400 16px/19px "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  opacity: 0.3;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

.slide-body .wall-tab:hover { opacity: 0.6; }
.slide-body .wall-tab.is-active { opacity: 1; }
.slide-body .wall-tab:focus-visible { outline: 2px solid #c9ff85; outline-offset: 4px; }

/* 格子：鼠标移上去显示客户名 */
.slide-body .wall-cell {
  pointer-events: auto;
}

/* logo 放在格子露出部分的正中（--cx / --cy / --mw 由构建脚本按每个格子算好）。
   multiply：有些 logo 图片自带白底，叠在浅灰的格子上会露出一块白，这样白底就和格子底色融为一体 */
.slide-body .wall-logo {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  max-width: var(--mw);
  height: auto;
  transform: translate(-50%, -50%) translateY(8px);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.slide-body .wall-logo.is-in {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.slide-body .wall-logo.is-out {
  opacity: 0;
  transition-duration: 0.25s;
}

.slide-body .wall-name {
  position: absolute;
  left: var(--cx);
  top: calc(var(--cy) + 42px);
  max-width: calc(var(--mw) + 24px);
  transform: translateX(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 16px;
  color: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.slide-body .wall-cell:hover .wall-name { opacity: 1; }

.slide-missing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #999;
  background: #f4f4f4;
}

/* 控制条：平时隐藏，移动鼠标时出现，避免遮挡设计内容 */
#deck-controls {
  position: fixed;
  right: 20px;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font: 13px/1 "Kumbh Sans", "Noto Sans SC", system-ui, sans-serif;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

#deck-controls.is-visible,
#deck-controls:hover,
#deck-controls:focus-within {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#deck-controls button {
  all: unset;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  transition: background 0.15s ease;
}

#deck-controls button:hover { background: rgba(255, 255, 255, 0.16); }
#deck-controls button:focus-visible { outline: 2px solid #c9ff85; outline-offset: -2px; }
#deck-controls button:disabled { opacity: 0.3; cursor: default; background: none; }

#deck-counter {
  min-width: 58px;
  padding: 0 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* ---------------------------------------------------------------- 全局顶部导航 + 滚动提示
   放在与页面同尺寸、同缩放的一层上，坐标按 1920 宽设计稿写（--vh / --s 由 deck.js 同步当前页） */

#deck-ui {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 1920px;
  height: var(--vh, 1080px);
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: center center;
  pointer-events: none;
  font-family: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#deck-nav {
  position: absolute;
  left: 92px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 72px;
  padding: 0 24px;
  border-radius: 999px;
  color: #000;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}

#deck-nav[hidden] { display: none; }
#deck-nav.is-dark { color: #fff; }
#deck-nav.is-floating {
  color: #000;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.dn-item { position: relative; pointer-events: auto; }

.dn-top {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 24px;
  margin: 0 -24px;
  font-size: 16px;
  line-height: 19px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.dn-top p { margin: 0; opacity: 0.3; transition: opacity 0.2s ease; }
.dn-top p.en { line-height: 20px; font-family: "Kumbh Sans", "Noto Sans SC", sans-serif; font-variation-settings: "YOPQ" 300; }
.dn-top i { font-style: normal; font-size: 10px; opacity: 0; margin-left: 2px; transition: opacity 0.2s ease, transform 0.2s ease; }
#deck-nav.is-dark:not(.is-floating) .dn-top p { opacity: 0.4; }
.dn-item:hover .dn-top p,
.dn-item:focus-within .dn-top p,
.dn-item.is-active .dn-top p { opacity: 1 !important; }
.dn-item:hover .dn-top i,
.dn-item:focus-within .dn-top i { opacity: 0.6; transform: rotate(180deg); }
.dn-top:focus-visible { outline: 2px solid #c9ff85; outline-offset: -6px; border-radius: 8px; }

.dn-menu {
  position: absolute;
  left: -14px;
  top: 100%;
  min-width: 248px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.dn-item:hover .dn-menu,
.dn-item:focus-within .dn-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.dn-item.dn-shut .dn-menu { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.dn-item.dn-shut .dn-top i { opacity: 0; transform: none; }

.dn-menu button {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 100%;
  padding: 0 14px 0 28px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 42px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dn-menu button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}

.dn-menu button:hover { background: #f3f4ef; }
.dn-menu button:focus-visible { outline: 2px solid #c9ff85; outline-offset: -2px; }
.dn-menu button.is-current { font-weight: 700; }
.dn-menu button.is-current::before { background: #c9ff85; box-shadow: 0 0 0 3px rgba(201, 255, 133, 0.35); }

#deck-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#deck-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
#deck-hint b { font-weight: 400; font-size: 18px; color: #c9ff85; animation: deck-hint-bob 1.4s ease-in-out infinite; }
#deck-hint.is-up b { animation-name: deck-hint-bob-up; }
#deck-hint small { font-size: 14px; opacity: 0.55; }

@keyframes deck-hint-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }
@keyframes deck-hint-bob-up { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-4px); } }

/* ---------------------------------------------------------------- 右侧缩略图目录 */

#deck-toc {
  --toc-w: 168px;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  width: var(--toc-w);
  pointer-events: none;
}

#deck-toc-toggle {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  right: var(--toc-w);
  z-index: 2;
  width: 28px;
  height: 64px;
  margin-top: -32px;
  border-radius: 10px 0 0 10px;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: right 0.28s ease, background 0.15s ease;
}

#deck-toc-toggle:hover { background: rgba(40, 40, 40, 0.9); }
#deck-toc-toggle:focus-visible { outline: 2px solid #c9ff85; outline-offset: -2px; }

#deck-toc-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 12, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 12px/1.3 "Kumbh Sans", "Noto Sans SC", system-ui, sans-serif;
  transform: translateX(0);
  transition: transform 0.28s ease;
  pointer-events: auto;
}

#deck-toc.is-collapsed {
  width: 0;
}

#deck-toc.is-collapsed #deck-toc-toggle {
  right: 0;
}

#deck-toc.is-collapsed #deck-toc-panel {
  transform: translateX(100%);
  pointer-events: none;
}

#deck-toc-head {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#deck-toc-head strong {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}

#deck-toc-head span {
  opacity: 0.45;
  font-variant-numeric: tabular-nums;
}

#deck-toc-list {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.deck-toc-item {
  all: unset;
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0 0 10px;
  cursor: pointer;
  color: inherit;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.deck-toc-item:last-child { margin-bottom: 0; }

.deck-toc-item:hover { background: rgba(255, 255, 255, 0.06); }
.deck-toc-item:focus-visible { outline: 2px solid #c9ff85; outline-offset: 2px; }

.deck-toc-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #1a1a1a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.deck-toc-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.deck-toc-thumb::after {
  content: attr(data-num);
  position: absolute;
  left: 6px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.62);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.2;
  opacity: 0.9;
}

.deck-toc-item.is-active .deck-toc-thumb {
  box-shadow: inset 0 0 0 2px #c9ff85;
}

.deck-toc-label {
  display: block;
  padding: 6px 4px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.72;
}

.deck-toc-item.is-active .deck-toc-label {
  opacity: 1;
  color: #c9ff85;
}

body.deck-toc-open #deck-controls {
  right: calc(20px + 168px);
}

@media (max-width: 720px) {
  #deck-toc { --toc-w: 132px; }
  body.deck-toc-open #deck-controls { right: calc(12px + 132px); }
}

@media (prefers-reduced-motion: reduce) {
  .slide.is-active { animation: none; }
  .slide-body .goto,
  #deck-controls,
  #deck-toc-toggle,
  #deck-toc-panel,
  #deck-nav,
  .dn-top p,
  .dn-menu,
  #deck-hint { transition: none; }
  #deck-hint b { animation: none; }
  .slide-body .goto--hint::after { animation: none; }
  .slide-body .wall-logo,
  .slide-body .wall-logo.is-out { transition: none; }
}
