/* ==========================================================================
   张仁浩 · 作品集
   开场：视频播放 → 交叉淡入 PSD 图层合成的首页
   ========================================================================== */

/* 思源宋体 Heavy，仅保留提示文字用到的 12 个字，4.9 KB */
@font-face {
  font-family: "Hint Serif";
  src: url("../assets/fonts/hint-heavy.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #d4c3a5;
  --hint: #702f16;

  /* 自定义光标：从设计作品页的朱红/印章红里取的偏亮一档，深色查看器里也能看见 */
  --cursor-red: #702f16;

  /* 视频 → 首页的交叉淡入时长（JS 会自动读取） */
  --intro-fade: 1000ms;

  --ease-crossfade: cubic-bezier(0.45, 0, 0.15, 1);
  --ease-lift: cubic-bezier(0.22, 1, 0.36, 1);

  /* 由 JS 根据窗口大小写入 */
  --scene-scale: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  overscroll-behavior: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   舞台
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}

/* 双页容器：两页叠放，只有当前页可见；切换时两页同时参与补间 */
.pages {
  position: absolute;
  inset: 0;
}

.page {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 1920×1080 的设计画布，整体等比缩放到窗口内 */
.scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  margin-top: -540px;
  margin-left: -960px;
  overflow: hidden;
  transform: scale(var(--scene-scale, 1));
  transform-origin: 50% 50%;
  z-index: 10;
}

html.js .page--home .scene {
  opacity: 0;
}

html.js.is-revealed .page--home .scene {
  opacity: 1;
}

/* 直接跳过视频时，画面自己淡入 */
html.js.is-revealed.is-skipped .page--home .scene {
  transition: opacity 600ms ease-out;
}

/* 开场结束前不接受鼠标交互，避免视频底下误触 */
html.js:not(.is-live) .page--home .scene {
  pointer-events: none;
}

/* 视差景深：切换页面时按 data-dolly 系数分别缩放，形成希区柯克变焦 */
.depth {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}


/* --------------------------------------------------------------------------
   设计作品页：新 PSD 的展示框 + 分类标题 + 竖向滚动 + 查看器
   - 长框 457×287，剪贴蒙版 357×201（相对 51,44）
   - 方框 339×336，内垫 #f1dfc7 265×265（相对 38,32）
   - 展示区 1920×780，top 100，上下渐隐
   -------------------------------------------------------------------------- */

.page--works {
  background: var(--paper);
}

.works-scene {
  background: var(--paper);
}

.works-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.works-wechat {
  position: absolute;
  left: 1507px;
  top: 891px;
  width: 364px;
  height: 66px;
  display: block;
  pointer-events: none;
}

.depth--nav {
  z-index: 6;
  pointer-events: none;
}

.depth--nav .nav-btn {
  pointer-events: auto;
}

.works-scroll {
  position: absolute;
  left: 0;
  top: 100px;
  width: 1920px;
  height: 780px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0,
    #000 36px,
    #000 calc(100% - 48px),
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0,
    #000 36px,
    #000 calc(100% - 48px),
    transparent 100%);
}

.works-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.works-flow {
  padding: 25px 0 120px;
}

.works-section {
  padding: 0 0 80px 361px;
}

.works-section__title {
  display: block;
  width: auto;
  height: auto;
  margin: 0 0 10px -28px;
  user-select: none;
  -webkit-user-drag: none;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 457px);
  gap: 24px 20px;
}

.works-grid--square {
  grid-template-columns: repeat(4, 339px);
  gap: 10px;
}

.works-grid--poster {
  grid-template-columns: repeat(3, 457px);
  gap: 24px 20px;
}

.work-card {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 450ms ease;
}

/* 海报 / 字体卡只做展示，不显示可点击光标 */
.work-card:not([data-board]) {
  cursor: default;
}

.work-card--rect {
  width: 457px;
  height: 287px;
}

.work-card--square {
  width: 339px;
  height: 336px;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-10px) scale(1.02);
  filter: drop-shadow(0 16px 18px rgba(56, 32, 10, 0.3));
  outline: none;
}

.work-card:focus-visible .work-card__frame {
  filter: drop-shadow(0 0 3px rgba(198, 150, 78, 0.95));
}

.work-card__mat {
  position: absolute;
  left: 38px;
  top: 32px;
  width: 265px;
  height: 265px;
  z-index: 1;
  background: #f1dfc7;
  pointer-events: none;
}

.work-card__media {
  position: absolute;
  display: block;
  pointer-events: none;
}

.work-card--rect .work-card__media {
  left: 51px;
  top: 44px;
  width: 357px;
  height: 201px;
  z-index: 2;
  object-fit: cover;
  background: #d8c7a7;
}

.work-card--square .work-card__media {
  left: 38px;
  top: 32px;
  width: 265px;
  height: 265px;
  z-index: 2;
  object-fit: contain;
}

.work-card--poster .work-card__media {
  background: #f1dfc7;
  object-fit: contain;
}

.work-card__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  object-fit: fill;
  pointer-events: none;
}


.works-tooltip {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -100%);
  padding: 9px 14px 8px;
  background: #2a190d;
  color: #f3e4c6;
  border: 1px solid rgba(214, 176, 112, 0.45);
  box-shadow: 0 10px 24px rgba(30, 15, 4, 0.35);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.works-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.works-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #2a190d;
}

/* 返回顶部 ---------------------------------------------------------------- */

.works-backtop {
  position: absolute;
  right: 42px;
  bottom: 196px;
  z-index: 7;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 1px solid rgba(255, 248, 238, 0.38);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cursor-red);
  color: #fff8ee;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(52, 24, 10, 0.32),
    inset 0 0 0 4px rgba(255, 248, 238, 0.08);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
              background 260ms ease,
              box-shadow 260ms ease;
}

.works-backtop:hover,
.works-backtop:focus-visible {
  transform: translateY(-4px) scale(1.04);
  background: #853b2b;
  box-shadow:
    0 14px 28px rgba(52, 24, 10, 0.38),
    0 0 0 6px rgba(112, 47, 22, 0.14),
    inset 0 0 0 4px rgba(255, 248, 238, 0.12);
  outline: none;
}

.works-backtop:active {
  transform: scale(0.94);
}

.works-backtop__arrow {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.works-backtop__tip {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 12px);
  transform: translate(50%, 4px);
  padding: 8px 13px 7px;
  background: #2a190d;
  color: #f3e4c6;
  border: 1px solid rgba(214, 176, 112, 0.45);
  box-shadow: 0 10px 24px rgba(30, 15, 4, 0.35);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

.works-backtop__tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #2a190d;
}

.works-backtop:hover .works-backtop__tip,
.works-backtop:focus-visible .works-backtop__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(50%, 0);
  transition: opacity 160ms ease, transform 160ms ease;
}

.works-backtop.is-clicked {
  animation: backtop-pop 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.works-backtop.is-clicked::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(255, 248, 238, 0.8);
  border-radius: 50%;
  pointer-events: none;
  animation: backtop-ring 560ms ease-out forwards;
}

@keyframes backtop-pop {
  0% { transform: scale(0.9); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes backtop-ring {
  0% { opacity: 0.8; transform: scale(0.82); }
  100% { opacity: 0; transform: scale(1.55); }
}

/* 查看器 ------------------------------------------------------------------ */

.viewer {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}

.viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms ease;
}

.viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 13, 8, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.viewer__panel {
  position: relative;
  z-index: 1;
  width: min(1500px, 92vw, calc((100vh - 160px) * 16 / 9));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.viewer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  color: #efe0c4;
}

.viewer__board {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(20px, 1.8vw, 30px);
  letter-spacing: 0.1em;
}

.viewer__count {
  margin: 5px 0 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgba(239, 224, 196, 0.62);
}

.viewer__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(239, 224, 196, 0.35);
  background: rgba(24, 16, 9, 0.4);
  color: #efe0c4;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms, transform 200ms;
}

.viewer__close:hover {
  background: rgba(239, 224, 196, 0.14);
  transform: rotate(90deg);
}

.viewer__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 10px;
  background: #0e0a06;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.viewer__panel.is-special {
  width: auto;
  max-width: 92vw;
}

.viewer__stage.is-special {
  width: max-content;
  max-width: 92vw;
  min-height: 0;
  padding: 16px;
  background: #f1dfc7;
}

.viewer__stage.is-special .viewer__img {
  max-width: min(80vw, 900px);
}

.viewer__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 220px);
}

.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(239, 224, 196, 0.4);
  background: rgba(20, 14, 8, 0.55);
  color: #f2e4c9;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms, opacity 200ms;
}

.viewer__nav:hover:not(:disabled) {
  background: rgba(239, 224, 196, 0.16);
}

.viewer__nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.viewer__nav--prev {
  left: -64px;
}

.viewer__nav--next {
  right: -64px;
}

.viewer__caption {
  margin: 0;
  color: rgba(239, 224, 196, 0.55);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-align: right;
}

html.is-live.is-works .particles {
  opacity: 0;
}

@media (max-width: 900px) {
  .viewer {
    padding: 12px;
  }

  .viewer__stage {
    min-height: 220px;
  }

  .viewer__img {
    max-height: 60vh;
  }

  .viewer__nav {
    top: auto;
    bottom: 16px;
    transform: none;
    width: 42px;
    height: 42px;
  }

  .viewer__nav--prev {
    left: 16px;
  }

  .viewer__nav--next {
    right: 16px;
  }

  .viewer__caption {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-card,
  .viewer,
  .viewer__nav,
  .viewer__close {
    transition-duration: 1ms;
  }

  .work-card:hover,
  .work-card:focus-visible {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   图层：坐标与尺寸来自 PSD（1920×1080）
   -------------------------------------------------------------------------- */

.layer {
  position: absolute;
  display: block;
  margin: 0;
  border: 0;
}

.layer img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.layer--bg {
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
}

.layer--character {
  left: 519px;
  top: 0;
  width: 1031px;
  height: 1080px;
}

.layer--bottom {
  left: 0;
  top: 871px;
  width: 1920px;
  height: 209px;
}

.layer--logo {
  left: 45px;
  top: 651px;
  width: 850px;
  height: 320px;
}

.layer--role {
  left: 1426px;
  top: 59px;
  width: 425px;
  height: 117px;
}

.layer--name {
  left: 1376px;
  top: 740px;
  width: 476px;
  height: 224px;
}

.layer--wechat {
  left: 1467px;
  top: 674px;
  width: 364px;
  height: 66px;
}

/* 个人简介：来自 个人介绍_网站版.psd（1920×1080） */
.layer--profile-bg {
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
}

.layer--profile-text {
  left: 347px;
  top: 114px;
  width: 1314px;
  height: 913px;
}

/* --------------------------------------------------------------------------
   左侧三个按钮：点亮/熄灭双图叠放，悬停与当前页切换状态
   槽位以点亮态尺寸为准，熄灭态居中，保证两种状态文字位置一致
   -------------------------------------------------------------------------- */

.nav-btn {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 450ms var(--ease-lift);
}

.nav-btn:hover,
.nav-btn:focus-visible {
  transform: translateY(-9px);
}

.stage.is-transitioning .nav-btn {
  pointer-events: none;
}

.nav-btn:focus-visible {
  outline: 2px solid rgba(112, 47, 22, 0.75);
  outline-offset: 6px;
}

.nav-btn__img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.nav-btn__img--off {
  opacity: 1;
}

.nav-btn.is-on .nav-btn__img--on,
.nav-btn:hover .nav-btn__img--on,
.nav-btn:focus-visible .nav-btn__img--on {
  opacity: 1;
}

.nav-btn.is-on .nav-btn__img--off,
.nav-btn:hover .nav-btn__img--off,
.nav-btn:focus-visible .nav-btn__img--off {
  opacity: 0;
}

.nav-btn--works {
  left: 26px;
  top: 244px;
  width: 240px;
  height: 120px;
}

.nav-btn--profile {
  left: 43px;
  top: 385px;
  width: 277px;
  height: 120px;
}

.nav-btn--design {
  left: 77px;
  top: 510px;
  width: 276px;
  height: 120px;
}

/* --------------------------------------------------------------------------
   立绘：循环上下浮动，悬停打断并上移，移出恢复
   -------------------------------------------------------------------------- */

.character-float {
  width: 100%;
  height: 100%;
  animation: character-float 6.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-play-state: paused;
}

html.is-live .character-float {
  animation-play-state: running;
}

.character-lift {
  width: 100%;
  height: 100%;
  transition: transform 550ms var(--ease-lift);
}

.layer--character:hover .character-float {
  animation-play-state: paused;
}

.layer--character:hover .character-lift {
  transform: translateY(-12px);
}

@keyframes character-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* --------------------------------------------------------------------------
   开场视频
   -------------------------------------------------------------------------- */

.intro-video {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 260ms ease-out;
  pointer-events: none;
  z-index: 30;
}

.intro-video.is-playing {
  opacity: 1;
}

html.is-revealed .intro-video {
  opacity: 0;
  transition: opacity var(--intro-fade) var(--ease-crossfade);
}

/* --------------------------------------------------------------------------
   金色粒子
   -------------------------------------------------------------------------- */

.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  transition: opacity 500ms ease;
}

/* --------------------------------------------------------------------------
   向下滑动提示：水平居中，距底端 20px
   -------------------------------------------------------------------------- */

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 40;
  opacity: 0;
  transition: opacity 900ms ease 120ms;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
}

html.is-live .scroll-hint {
  opacity: 1;
}

/* 个人简介页没有下一页，隐藏“继续浏览”提示 */
html.is-profile .scroll-hint {
  opacity: 0;
  transition: opacity 350ms ease;
}

/* 查看器打开时，提示让位给图片 */
html.is-viewer .scroll-hint {
  opacity: 0;
  transition: opacity 220ms ease;
}

/* 滚到作品页底部时，继续下滑提示让位给返回顶部 */
html.is-works-bottom .scroll-hint {
  opacity: 0;
  transition: opacity 320ms ease;
}

.scroll-hint__float {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1vh, 14px);
  animation: hint-float 3.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.scroll-hint__triangle {
  display: block;
  width: 0;
  height: 0;
  border-left: clamp(5px, 0.45vw, 8px) solid transparent;
  border-right: clamp(5px, 0.45vw, 8px) solid transparent;
  border-top: clamp(7px, 0.65vw, 11px) solid var(--hint);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 1))
          drop-shadow(0 0 8px rgba(255, 255, 255, 0.95))
          drop-shadow(0 0 16px rgba(255, 255, 255, 0.75));
}

.scroll-hint__text {
  font-family: "Hint Serif", "Source Han Serif CN Heavy", "Source Han Serif CN",
               "Noto Serif CJK SC", "Songti SC", serif;
  font-weight: 900;
  font-size: clamp(14px, 1.1vw, 26px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--hint);
  text-shadow:
    0 0 3px rgba(255, 255, 255, 1),
    0 0 7px rgba(255, 255, 255, 1),
    0 0 14px rgba(255, 255, 255, 0.92),
    0 0 26px rgba(255, 255, 255, 0.7);
}

@keyframes hint-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* --------------------------------------------------------------------------
   自定义红色圆形光标
   -------------------------------------------------------------------------- */

html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none !important;
}

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cursor-red);
  box-shadow:
    0 0 0 1px rgba(255, 247, 235, 0.7),
    0 0 12px rgba(112, 47, 22, 0.45);
  transform: translate(-50%, -50%) scale(1);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
  will-change: transform;
}

.cursor.is-active .cursor__dot {
  transform: translate(-50%, -50%) scale(1.9);
  box-shadow:
    0 0 0 1px rgba(255, 247, 235, 0.55),
    0 0 12px 4px rgba(112, 47, 22, 0.85),
    0 0 32px 14px rgba(112, 47, 22, 0.4);
}

.cursor.is-pressed .cursor__dot {
  transform: translate(-50%, -50%) scale(0.86);
}

.cursor-ripple {
  position: fixed;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cursor-red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 490;
  transform: translate(-50%, -50%) scale(0.3);
  animation: cursor-ripple 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 14px rgba(112, 47, 22, 0.35);
}

@keyframes cursor-ripple {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.3);
  }
  40% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor__dot {
    transition-duration: 1ms;
  }

  .cursor-ripple {
    animation-duration: 1ms;
  }
}

@media (pointer: coarse) {
  .cursor,
  .cursor-ripple {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   无障碍：减少动态效果
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .character-float,
  .scroll-hint__float {
    animation: none;
  }

  .works-backtop,
  .works-backtop.is-clicked,
  .works-backtop.is-clicked::after {
    animation: none;
    transition-duration: 1ms;
  }

  .nav-btn,
  .character-lift {
    transition-duration: 1ms;
  }
}

/* --------------------------------------------------------------------------
   没有 JS 时也要能看到完整画面和提示
   -------------------------------------------------------------------------- */

html.no-js .page--home .scene,
html.no-js .scroll-hint {
  opacity: 1;
}

html.no-js .character-float {
  animation-play-state: running;
}

html.no-js .layer--character {
  pointer-events: auto;
}
