html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}
body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: #0a0a0b;
  color: #fafafa;
  -webkit-font-smoothing: antialiased;
}
@media (pointer: fine) {
  body.cursor-custom {
    cursor: none;
  }
}
#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #fafafa;
  z-index: 60;
  transition: width 0.3s ease-out;
  pointer-events: none;
}
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #030303;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.65s ease-out, visibility 0.65s ease-out;
}
#loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-el {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}
.loader-el.is-in {
  opacity: 1;
  transform: translateY(0);
}
#loader-bar {
  transition: width 0.05s linear;
}
.nav-link {
  position: relative;
  display: inline-block;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.3s ease-out;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}
#custom-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s ease-out, height 0.2s ease-out, border 0.2s ease-out,
    background-color 0.2s ease-out;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #fff;
  border: none;
}
.cursor-dot.is-hover {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #fff;
}
.hero-line {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.hero-line.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* —— 英雄区：氛围与交互（软装 /空间感） —— */
.hero-section {
  --hero-x: 50%;
  --hero-y: 42%;
}
.hero-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-ambient {
  background: radial-gradient(ellipse 85% 50% at 50% -5%, rgba(55, 55, 62, 0.38) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 85% 95%, rgba(38, 38, 48, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse 40% 35% at 12% 75%, rgba(32, 32, 40, 0.22) 0%, transparent 45%);
  animation: hero-ambient-drift 20s ease-in-out infinite alternate;
}
.hero-vignette {
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.45) 100%);
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.hero-mouse-glow {
  background: radial-gradient(
    circle 38vmin at var(--hero-x) var(--hero-y),
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.02) 28%,
    transparent 58%
  );
  opacity: 1;
  transition: opacity 0.4s ease-out;
}
.hero-inner {
  transition: transform 0.2s ease-out;
}
@media (pointer: coarse) {
  .hero-mouse-glow {
    opacity: 0.35;
  }
  .hero-inner {
    transition: none;
  }
}
.hero-title-glow {
  text-shadow: 0 0 80px rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.4);
}
.hero-divider {
  margin-top: 1.75rem;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transition: width 0.75s ease-out;
}
.hero-divider.is-show {
  width: min(12rem, 70vw);
}
/* Scroll：6 个字母依次上下跳动 */
.hero-scroll-label {
  transform-origin: 50% 100%;
}
.hero-scroll-char {
  display: inline-block;
  animation: scroll-letter-hop 1.32s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
}
.hero-scroll-char:nth-child(1) {
  animation-delay: 0s;
}
.hero-scroll-char:nth-child(2) {
  animation-delay: 0.11s;
}
.hero-scroll-char:nth-child(3) {
  animation-delay: 0.22s;
}
.hero-scroll-char:nth-child(4) {
  animation-delay: 0.33s;
}
.hero-scroll-char:nth-child(5) {
  animation-delay: 0.44s;
}
.hero-scroll-char:nth-child(6) {
  animation-delay: 0.55s;
}
.hero-scroll-btn .scroll-hint-icon {
  animation: scroll-hint-move 2.75s ease-in-out infinite;
  animation-delay: 0.1s;
}
#scroll-hint.hero-line {
  transform: translateX(-50%) translateY(14px);
}
#scroll-hint.hero-line.is-show {
  transform: translateX(-50%) translateY(0);
}
@keyframes hero-ambient-drift {
  0% {
    transform: scale(1) translate(0, 0);
    filter: brightness(1);
  }
  100% {
    transform: scale(1.04) translate(-1.5%, 1.2%);
    filter: brightness(1.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ambient {
    animation: none;
  }
  .hero-mouse-glow {
    display: none;
  }
  .hero-inner {
    transform: none !important;
  }
  .hero-scroll-btn .scroll-hint-icon,
  .hero-scroll-char {
    animation: none;
  }
}
/* 作品：模糊/透明度由 JS 随滚动连续插值（更流畅） */
.work-scroll-reveal {
  opacity: 0.35;
  filter: blur(5px);
  translate: 0 10px;
  will-change: opacity, filter, translate;
}
@media (prefers-reduced-motion: reduce) {
  .work-scroll-reveal {
    opacity: 1 !important;
    filter: none !important;
    translate: none !important;
    will-change: auto;
  }
}
/* 作品图：圆角 + 阴影，与背景分层 */
.case-card-frame {
  overflow: hidden;
  border-radius: 10px;
  background: #18181b;
  box-shadow: 0 2px 0 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px -12px rgba(0, 0, 0, 0.6),
    0 32px 56px -24px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.35s ease-out, transform 0.35s ease-out;
}
.case-card .case-img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
/* 首页主案例：上浮 + 阴影加深 */
.case-card:hover .case-card-frame {
  box-shadow: 0 2px 0 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 60px -18px rgba(0, 0, 0, 0.7),
    0 40px 72px -20px rgba(0, 0, 0, 0.5);
}
.works-grid__hero:hover .case-card-frame,
.works-grid__wide:hover .case-card-frame {
  transform: translateY(-4px);
}
.works-grid__hero:hover .case-img,
.works-grid__wide:hover .case-img {
  transform: scale(1.04);
}
/* 首页小案例：仅轻微放大 */
.works-grid__small:hover .case-card-frame,
.works-grid__extra:hover .case-card-frame {
  transform: translateY(-2px);
}
.works-grid__small:hover .case-img,
.works-grid__extra:hover .case-img {
  transform: scale(1.03);
}
/* 首页作品区：双列杂志式网格 */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .works-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem 2.5rem;
    align-items: start;
  }
  .works-grid__hero {
    grid-row: span 2;
  }
  .works-grid__wide {
    grid-column: 1 / -1;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.75rem;
    align-items: start;
  }
  .works-grid__wide {
    grid-column: 1 / -1;
  }
}
.works-grid .case-card-frame {
  aspect-ratio: 16 / 10;
}
@media (min-width: 1024px) {
  .works-grid__hero .case-card-frame {
    aspect-ratio: 3 / 4;
  }
  .works-grid__wide .case-card-frame {
    aspect-ratio: 21 / 9;
    max-height: 320px;
  }
  .works-grid__hero--alt .case-card-frame,
  .works-grid__extra .case-card-frame {
    aspect-ratio: 16 / 10;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .works-grid .case-card-frame {
    aspect-ratio: 4 / 3;
  }
}
@keyframes scroll-letter-hop {
  0%,
  22%,
  100% {
    transform: translateY(0);
  }
  11% {
    transform: translateY(-15px);
  }
}
@keyframes scroll-hint-move {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  33% {
    transform: translateY(7px);
    opacity: 0.88;
  }
  55% {
    transform: translateY(2px);
    opacity: 0.55;
  }
  72% {
    transform: translateY(8px);
    opacity: 0.92;
  }
}
.scroll-hint-icon {
  animation: scroll-hint-move 2.75s ease-in-out infinite;
}

/* 案例页面：内容区域图片交互 */
.work-content-img {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #18181b;
}
.work-content-img img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.work-content-img:hover img {
  transform: scale(1.04);
}
/* 内容图片 hover 时的光晕边框 */
.work-content-img::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.4s ease-out;
  pointer-events: none;
  z-index: 1;
}
.work-content-img:hover::before {
  opacity: 1;
}

/* —— 详情页：work-figure 叙事图集模块 —— */
.work-figure {
  margin: 0;
}
.work-figure figcaption {
  margin-top: 0.75rem;
  font-size: 12px;
  color: #71717a;
  letter-spacing: 0.05em;
}
/* 模块 A：全宽大图 */
.work-figure--full {
  margin-top: 2rem;
}
.work-figure--full .work-content-img {
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}
@media (min-width: 1024px) {
  .work-figure--full .work-content-img {
    aspect-ratio: 21 / 9;
  }
}
.work-figure--full .work-content-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease-out;
  pointer-events: none;
  border-radius: inherit;
}
.work-figure--full .work-content-img:hover::after {
  opacity: 1;
}
/* 全宽大图 hover 放大图标 */
.work-figure--full .work-content-img .zoom-icon {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: scale(0.6) translateY(8px);
  transition: opacity 0.35s ease-out, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-figure--full .work-content-img:hover .zoom-icon {
  opacity: 1;
  transform: scale(1) translateY(0);
}
/* 模块 B：左右非对称双图 */
.work-figure--split {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .work-figure--split {
    grid-template-columns: 55% 1fr;
  }
}
.work-figure--split__small {
  display: grid;
  gap: 1.25rem;
}
.work-figure--split .work-content-img {
  height: 100%;
}
.work-figure--split__large .work-content-img {
  aspect-ratio: 4 / 5;
}
.work-figure--split__small .work-content-img {
  aspect-ratio: 3 / 2;
}
@media (max-width: 767px) {
  .work-figure--split__large .work-content-img,
  .work-figure--split__small .work-content-img {
    aspect-ratio: 16 / 10;
  }
  .work-figure--split__small {
    grid-template-columns: 1fr 1fr;
  }
}
/* 模块 C：双列等宽图 */
.work-figure--duo {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .work-figure--duo {
    grid-template-columns: 1fr 1fr;
  }
}
.work-figure--duo .work-content-img {
  aspect-ratio: 3 / 2;
}

/* 缩略图导航条 */
.thumb-strip {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.thumb-strip::-webkit-scrollbar {
  height: 4px;
}
.thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.thumb-strip__item {
  flex: 0 0 auto;
  width: 88px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, box-shadow 0.25s ease-out;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.thumb-strip__item:hover,
.thumb-strip__item.is-active {
  opacity: 1;
}
.thumb-strip__item.is-active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
}
.thumb-strip__item img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
}
@media (min-width: 768px) {
  .thumb-strip__item {
    width: 104px;
  }
}
.work-gallery__visual--zoom {
  width: min(92vw, 1120px);
  max-height: 85vh;
}
.work-gallery__visual--zoom .case-img {
  aspect-ratio: auto;
  min-height: min(70vh, 640px);
  max-height: 85vh;
}
.work-gallery__visual--zoom img {
  aspect-ratio: auto;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 4, 0.9);
  backdrop-filter: blur(10px);
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 210;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(82, 82, 91, 0.9);
  border-radius: 9999px;
  font-size: 1.5rem;
  line-height: 1;
  color: #e4e4e7;
  background: rgba(18, 18, 20, 0.85);
  transition: border-color 0.3s ease-out, color 0.3s ease-out, background-color 0.3s ease-out;
}
.lightbox__close:hover {
  border-color: #a1a1aa;
  color: #fff;
  background: rgba(39, 39, 42, 0.95);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 210;
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(82, 82, 91, 0.9);
  border-radius: 9999px;
  color: #e4e4e7;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(4px);
  transform: translateY(-50%);
  transition: border-color 0.3s ease-out, color 0.3s ease-out, background-color 0.3s ease-out, transform 0.2s ease-out;
}
.lightbox__nav:hover {
  border-color: #a1a1aa;
  color: #fff;
  background: rgba(39, 39, 42, 0.95);
}
.lightbox__nav:active {
  transform: translateY(-50%) scale(0.92);
}
.lightbox__prev {
  left: 1rem;
}
.lightbox__next {
  right: 1rem;
}

/* 案例页面：上一个/下一个案例导航 */
.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(63, 63, 70, 0.4);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 4rem;
}
.case-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem 1.75rem;
  background: #0f0f10;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease-out;
}
.case-nav__link:hover {
  background: #18181b;
}
.case-nav__link--next {
  text-align: right;
}
.case-nav__label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #52525b;
}
.case-nav__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #d4d4d8;
  transition: color 0.3s ease-out;
}
.case-nav__link:hover .case-nav__title {
  color: #fafafa;
}

/* 汉堡菜单动画 */
.menu-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 14px;
}
.menu-icon__bar {
  display: block;
  width: 100%;
  height: 1px;
  background: #fafafa;
  border-radius: 1px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease-out;
  transform-origin: center;
}
/* 打开状态：两条线旋转成 × */
.menu-icon.is-open .menu-icon__bar:first-child {
  transform: translateY(2.5px) rotate(45deg);
}
.menu-icon.is-open .menu-icon__bar:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}
.lightbox__content {
  position: relative;
  z-index: 205;
  max-height: 90vh;
  cursor: pointer;
}
.lightbox__slot {
  pointer-events: auto;
}

/* ============ 1. 磁吸光标 ============ */
#custom-cursor {
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border 0.25s ease-out,
    background-color 0.25s ease-out;
}
.cursor-dot.is-magnetic {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  mix-blend-mode: difference;
}

/* ============ 2. 页面切换遮罩 ============ */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #0a0a0b;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.page-transition.is-active {
  pointer-events: auto;
}
.page-transition.is-entering {
  animation: pt-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.page-transition.is-leaving {
  animation: pt-leave 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes pt-enter {
  0% { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes pt-leave {
  0% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}

/* ============ 3. 文字滚动动画 ============ */
.scroll-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease-out;
}
.scroll-char.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* 空格保持宽度 */
.scroll-char--space {
  width: 0.3em;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-char {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============ 4. 3D 倾斜卡片 ============ */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease-out;
}
.tilt-card__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 2;
  background: radial-gradient(circle 300px at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255, 255, 255, 0.12) 0%, transparent 60%);
}
.tilt-card:hover .tilt-card__shine {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .tilt-card {
    transform: none !important;
  }
  .tilt-card__shine {
    display: none;
  }
}

/* ============ 5. 图片入场动画 ============ */
.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal img {
  transform: scale(1.2);
  opacity: 0.3;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 1s ease-out;
}
.img-reveal.is-revealed img {
  transform: scale(1);
  opacity: 1;
}
/* 从左滑入遮罩 */
.img-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #18181b;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  z-index: 2;
}
.img-reveal.is-revealed::after {
  transform: scaleX(0);
}
@media (prefers-reduced-motion: reduce) {
  .img-reveal::after {
    display: none;
  }
  .img-reveal img {
    transform: none;
  }
}

/* ============ 7. 悬停视差位移 ============ */
.parallax-img {
  overflow: hidden;
  position: relative;
}
.parallax-img img {
  transition: transform 0.15s ease-out;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .parallax-img img {
    transform: none !important;
  }
}

@media (pointer: coarse) {
  #custom-cursor {
    display: none !important;
  }
  body.cursor-custom {
    cursor: auto;
  }
}
