/* ========================================
   MONOCHROME — Design Studio
   Minimalist Black & White Portfolio
   ======================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background: #0e0e0e;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--black);
  background: #0e0e0e;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul { list-style: none; }

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --black: #0a0a0a;
  --white: #ffffff;
  --off-white: #f7f7f5;
  --dark: #1a1a1a;
  --border: #e5e5e5;
  --gray-l: #999999;
  --gray-m: #666666;
  --gray-d: #333333;
  --brand-blue: #4A90E2;

  /* Typography */
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1400px;
  --header-height: 64px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --duration: 0.3s;
  --duration-slow: 0.6s;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Bilingual EN→CN Hover ---------- */
.bilingual {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.bilingual .bi-en,
.bilingual .bi-cn {
  display: inline-block;
  transition: opacity 0.25s var(--ease);
}

.bilingual .bi-cn {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.bilingual:hover .bi-en {
  opacity: 0;
}

.bilingual:hover .bi-cn {
  opacity: 1;
}

.bilingual .bi-cn em {
  font-style: normal;
}

/* Chinese text: no italic */
.bi-cn {
  font-style: normal;
}

/* Bilingual text inside buttons with trailing arrow */
.btn-text {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-text .bi-cn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Header / Navigation ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  transition: background var(--duration) var(--ease);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--black);
}

.logo-img {
  height: 32px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--duration) var(--ease);
}

.nav-link:hover {
  color: var(--brand-blue);
}

.nav-link .bi-cn {
  color: var(--brand-blue);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 20px;
  height: 1.5px;
  background: #ffffff;
  transition: all var(--duration) var(--ease);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
  position: relative;
  background: #0e0e0e;
}

/* Dot matrix canvas — removed, replaced with marquee + grain */

/* Grain texture overlay */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Large background marquee text */
.hero-marquee {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  font-size: clamp(80px, 16vw, 220px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.035);
  animation: marquee 30s linear infinite;
  will-change: transform;
}

.marquee-track .dot {
  font-size: 0.4em;
  color: rgba(74, 144, 226, 0.08);
  padding: 0 0.3em;
  transform: translateY(-0.15em);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-content {
  max-width: 900px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 1;
}

/* Hero entrance animation */
.hero-anim {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.12s);
}

.hero-anim.hero-in {
  opacity: 1;
  transform: translateY(0);
}

/* Title line mask reveal */
.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line > span {
  display: block;
}

.hero-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 32px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 48px;
}

/* 颜色过渡需与 .hero-anim 的入场过渡合并，否则会把入场动画覆盖掉 */
.hero-title .hero-line {
  transition:
    color 0.45s var(--ease) 0s,
    opacity 0.6s var(--ease-out) calc(var(--d, 0) * 0.12s),
    transform 0.6s var(--ease-out) calc(var(--d, 0) * 0.12s);
}

.hero-title .hero-line:first-child {
  color: var(--brand-blue);
}

.hero-title .hero-line:last-child {
  color: rgba(255, 255, 255, 0.85);
}

/* 鼠标经过：蓝白互换 */
.hero-title:hover .hero-line:first-child {
  color: #ffffff;
}

.hero-title:hover .hero-line:last-child {
  color: var(--brand-blue);
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--brand-blue);
}

/* Magnetic CTA */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 10px 24px;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
  cursor: pointer;
  background: transparent;
  will-change: transform;
}

.hero-cta.magnetic {
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              transform 0.3s var(--ease-out);
}

.hero-cta:hover {
  background: var(--brand-blue);
  color: var(--white);
  border-color: var(--brand-blue);
}

.hero-cta .arrow {
  transition: transform var(--duration) var(--ease);
}

.hero-cta:hover .arrow {
  transform: translateY(4px);
}

/* Scroll indicator —— 双尖括号向下箭头（chevron ×2，交错呼吸+下滑） */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.scroll-chevron {
  display: block;
  width: 13px;
  height: 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  transform: rotate(45deg);
  animation: chevronScroll 2s var(--ease) infinite;
}

.scroll-chevron:nth-child(2) {
  animation-delay: 0.3s;
}

@keyframes chevronScroll {
  0%   { opacity: 0; transform: rotate(45deg) translate(-3px, -3px); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(5px, 5px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-chevron { animation: none; opacity: 0.62; }
  .marquee-track { animation: none; }
}

/* ---------- Hero Category Nav（分类导航 · hero 版） ----------
/* ---------- 单一分类导航：首页 slogan 下方；不吸顶，滚动随文档流走；展开态由 CSS 隐藏 ---------- */
.cat-nav-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 170px);
  margin: 0;
  z-index: 80;
  padding: 14px 32px;
  display: flex;
  justify-content: center;
  background: transparent;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease);
}

.cat-nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 811px;
  max-width: 100%;
  min-height: 48px;
}

.cat-nav-bar .filter-btn {
  color: #b0b0b0;
  border-color: rgba(255, 255, 255, 0.14);
}

.cat-nav-bar .filter-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* 当前正在查看的分类：品牌蓝高亮 */
.cat-nav-bar .filter-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* 展开单分类时固定在右下角的"返回"按钮：大字、细体 */
.cat-back-floating {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 90;
  display: none;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  padding: 14px 34px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

body.cat-expanded .cat-back-floating {
  display: block;
}

.cat-back-floating:hover {
  background: rgba(35, 35, 35, 0.96);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* 展开态：hero 不再 display:none（否则内容会瞬间上跳）。
   改用 JS 平滑把 hero 高度收起（滑上去），胶囊菜单随 hero 一起被裁掉，
   分类区自然地滑到页面顶部，像进入二级页，但过程无跳变。 */
body.cat-expanded #hero {
  pointer-events: none;
}

/* hero 收起/展开改为 CSS 过渡驱动，避免 JS 每帧写高度导致主线程重排卡顿（丝滑关键） */
#hero {
  transition: height 0.7s var(--ease), opacity 0.7s var(--ease), padding 0.7s var(--ease);
}
#hero.hero-collapsing {
  display: block !important;
  height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ---------- Section Headings ---------- */
.section {
  padding: 100px 0;
}

.section-featured {
  padding: 0;
  background: #0e0e0e;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 56px;
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gray-l);
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---------- Works Grid ---------- */
.works-grid,
.works-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #0e0e0e;
  border-top: none;
  border-bottom: none;
}

.works-grid {
  background: #0e0e0e;
  border-top: none;
}

.featured-more {
  display: flex;
  justify-content: center;
  padding: 64px 32px 80px;
  background: #0e0e0e;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #f7f7f5;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  padding: 16px 40px;
  transition: all 0.4s var(--ease);
}

.btn-more .arrow {
  transition: transform 0.4s var(--ease);
}

.btn-more:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.btn-more:hover .arrow {
  transform: translateX(6px);
}

/* ---------- Home Works Section（替换原分类栏目：全部作品 + 更多案例） ---------- */
.section-works {
  padding: 100px 0 0;
  background: #0e0e0e;
}
.section-works .section-label { color: rgba(255, 255, 255, 0.5); }
.section-works .section-title { color: #f7f7f5; }
.section-works .section-header { margin-bottom: 40px; }
.section-works .works-page-grid { gap: 0; background: #0e0e0e; }

/* ---------- Posters Preview (Home) ---------- */
.posters-preview {
  padding: 0;              /* 与上方案例网格无缝衔接 */
  background: #0e0e0e;
}

.posters-preview-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;                  /* 海报之间不留缝，连成整条 */
}

.poster-preview-item {
  display: block;
  overflow: hidden;
  background: #1b1b1b;
  aspect-ratio: 1351 / 2000;
}

.poster-preview-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease);
}

.poster-preview-item:hover img {
  transform: scale(1.045);
  opacity: 1;
}

/* ---------- Home Category Preview Rows（B 方案：每个分类一排，右上角点击查看） ---------- */
.section-cats {
  padding: 96px 0 40px;
  background: #0e0e0e;
}

.cat-row {
  padding: 0 32px;
  margin-bottom: 72px;
}

.cat-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* 标题与「点击更多」之间的灰色线 */
.cat-row-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  align-self: center;
  margin: 0 24px;
  order: 2;
}

.cat-row-title {
  font-size: 16px;
  font-weight: 300;
  color: #f7f7f5;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  order: 1;
}

.cat-row-en {
  font-size: 12px;
  font-weight: 400;
  color: #6f6f6f;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cat-row-viewall {
  font-size: 13px;
  color: #b0b0b0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s var(--ease);
}

.cat-row-viewall:hover {
  color: var(--brand-blue);
}

.cat-row-viewall .arrow {
  transition: transform 0.3s var(--ease);
}

.cat-row-viewall:hover .arrow {
  transform: translateX(4px);
}

.cat-row-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 1px;
  background: #0e0e0e;
  border-top: none;
  border-bottom: none;
}

/* 分类行里的项目卡片改用 3:2（与案例页一致，比首页 4:3 更现代） */
.cat-row .work-card {
  aspect-ratio: 3 / 2;
  border-top: none;
}

/* 剧院物料行：3:2 横卡缩略图，点击跳剧院物料页 */
.cat-row-thumb {
  display: block;
  overflow: hidden;
  background: #1b1b1b;
  aspect-ratio: 3 / 2;
}

.cat-row-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
}

.cat-row-thumb:hover img {
  transform: scale(1.05);
  opacity: 1;
}

/* 海报行继续用竖卡（0.675），与海报页一致 */
.cat-row-grid--poster .poster-preview-item {
  aspect-ratio: 1351 / 2000;
}

/* ---------- 分类展开态（点击「更多」后其他行收起，只显示当前分类全部作品） ---------- */
.cat-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 3;
}
}

.cat-row-back {
  display: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #b0b0b0;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.cat-row-back:hover {
  color: var(--brand-blue);
}

/* 折叠/展开动画：用 CSS Grid 0fr→1fr 实现丝滑无跳变（替代 max-height 的跳变）
   —— 外层 .cat-row-collapsible 是单轨道 grid，内层网格作为唯一子项 overflow:hidden、
      min-height:0；轨道从 0fr 过渡到 1fr 即可平滑改变高度，不依赖内容真实高度，无跳变。 */
.cat-row-collapsible {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.7s var(--ease), opacity 0.5s var(--ease);
}

.cat-row-collapsible > .cat-row-grid,
.cat-row-collapsible > .cat-row-grid-full {
  overflow: hidden;
  min-height: 0;
}

/* 展开网格默认收起（0 高度、透明、不可点），仅在对应行展开时才打开 */
.cat-row-collapsible.c-full {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.cat-row-grid-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #0e0e0e;
}

/* 海报展开：5 列竖卡 */
.cat-row[data-cat="Posters"] .cat-row-grid-full {
  grid-template-columns: repeat(5, 1fr);
}

.cat-row {
  transition: margin-bottom 0.7s var(--ease);
}

body.cat-expanded .cat-row {
  margin-bottom: 0;
}

/* 展开态：当前行的预览网格与所有非当前行的预览网格都像"闭眼睛"一样收起，
   只打开当前行的完整网格；展开行的「点击更多」隐藏，折叠行保留标题+细线+点击更多。 */
body.cat-expanded .cat-row .cat-row-collapsible.c-preview {
  grid-template-rows: 1fr;
  opacity: 1;
}

body.cat-expanded .cat-row.expanded .cat-row-collapsible.c-preview,
body.cat-expanded .cat-row.collapsed .cat-row-collapsible.c-preview {
  grid-template-rows: 0fr;
  opacity: 0;
}

body.cat-expanded .cat-row.expanded .cat-row-collapsible.c-full {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

body.cat-expanded .cat-row:not(.expanded) .cat-row-collapsible.c-full {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

body.cat-expanded .cat-row.expanded .cat-row-viewall {
  display: none;
}

/* 折叠行：保留标题和细线，只把作品网格收起，标题行变淡；
   展开态下点折叠行标题 = 切换到该分类，加手型光标与 hover 提亮 */
body.cat-expanded .cat-row.collapsed .cat-row-head {
  opacity: 0.55;
  transition: opacity 0.4s var(--ease);
  cursor: pointer;
}

body.cat-expanded .cat-row.collapsed .cat-row-head:hover {
  opacity: 1;
}

/* 展开态：被展开行的标题行吸顶在 header 下方，滚动时分类标签始终可见 */
body.cat-expanded .cat-row.expanded .cat-row-head {
  position: sticky;
  top: var(--header-height);
  z-index: 70;
  background: #0e0e0e;
  margin-bottom: 20px;
  padding: 16px 0;
}

/* 展开态：隐藏公司简介、联系我们、Footer；只保留作品和右下角"返回" */
body.cat-expanded #studio,
body.cat-expanded #contact,
body.cat-expanded .footer {
  display: none;
}

/* 展开态响应式 */
@media (max-width: 1100px) {
  .cat-row-grid-full,
  .cat-row[data-cat="Posters"] .cat-row-grid-full {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .cat-row-grid-full,
  .cat-row[data-cat="Posters"] .cat-row-grid-full {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式：直接覆盖列数（不依赖 --cols 变量，避免被内联 style 顶掉） */
@media (max-width: 1100px) {
  .cat-row-grid,
  .cat-row-grid--poster,
  .cat-row-grid--theater {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .cat-row { padding: 0 16px; margin-bottom: 56px; }
  .cat-row-grid,
  .cat-row-grid--poster,
  .cat-row-grid--theater {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-row-title { font-size: 18px; }
  .cat-row-en { display: none; }
}

/* 桌面与中等屏：一行 5 张，共两行（10 张正好铺满） */
/* 小屏：一行 2 张、共五行 */
@media (max-width: 768px) {
  .posters-preview-grid { grid-template-columns: repeat(2, 1fr); }
}

.works-page-grid {
  border-top: 0.5px solid #0e0e0e;
  border-bottom: 0.5px solid #0e0e0e;
}

.work-card {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.4s var(--ease);
  background: #0e0e0e;
}

.work-card .card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: none;
  transform: scale(1.02);
  opacity: 1;
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}

.work-card:hover .card-img {
  filter: none;
  transform: scale(1.08);
}

.work-card .card-content {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px 32px;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.work-card:hover .card-content {
  transform: translateY(-2px);
}

.work-card-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.work-card-title {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
  white-space: pre-line;
}

.work-card-title .bilingual {
  display: inline-block;
}

.work-card-year {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.work-card.light,
.work-card.dark {
  background: #0e0e0e;
}

/* ---------- Studio / About ---------- */
.studio {
  padding: 180px 0;
  background: #0e0e0e;
  color: #f0f0f0;
}

.studio-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}

.studio-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--brand-blue);
}

.studio-body {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.7;
  color: #b0b0b0;
  font-weight: 300;
}

.studio-body p + p {
  margin-top: 20px;
}

.studio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  color: var(--brand-blue);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #777;
  color: var(--gray-l);
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact {
  padding: 120px 32px;
  text-align: center;
  background: #0e0e0e;
  color: #f0f0f0;
}

.contact-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.contact-email {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #f7f7f5;
  display: inline-block;
  position: relative;
  margin-bottom: 32px;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--brand-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-qr {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-qr img {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.contact-qr-label {
  font-size: 12px;
  color: #777;
  margin-top: 10px;
  letter-spacing: 0.05em;
}

.social-link {
  font-size: 13px;
  color: #999;
  transition: color var(--duration) var(--ease);
}

.social-link:hover {
  color: var(--brand-blue);
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  background: #0e0e0e;
  font-size: 12px;
  color: #777;
}

/* ---------- Works Page ---------- */
.page-header {
  padding: 160px 0 48px;
  text-align: center;
}

.page-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--brand-blue);
}

.page-subtitle {
  font-size: 14px;
  color: var(--gray-m);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-m);
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.filter-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.filter-btn.active {
  background: var(--brand-blue);
  color: var(--white);
  border-color: var(--brand-blue);
}

a.filter-btn {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* 首页分类栏（落在 .section-featured 的 #111 深色带内）
   —— 结构复用 .filter-bar，只换成深色底可读的配色；作品页/海报页不受影响 */
.filter-bar-dark {
  padding: 72px 32px 0;   /* 下留白交给 .featured-more 自带的 padding-top */
  background: #0e0e0e;
}

.filter-bar-dark .filter-btn {
  color: #b0b0b0;
  border-color: rgba(255, 255, 255, 0.14);
}

.filter-bar-dark .filter-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* Works page dark theme */
.body-works {
  background: #0e0e0e;
  color: #f0f0f0;
}

.body-works .page-header {
  padding-top: 140px;
}

.body-works .page-title {
  color: var(--brand-blue);
}

.body-works .page-subtitle {
  color: #999;
}

.body-works .filter-bar {
  padding: 140px 0 56px;   /* 原由 .page-header 提供的顶部留白（顶开固定 header） */
}

.body-works .filter-btn {
  color: #b0b0b0;
  border-color: rgba(255, 255, 255, 0.14);
}

.body-works .filter-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.body-works .filter-btn.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--white);
}

.body-works .works-page-grid,
.body-works .theater-grid {
  background: #0e0e0e;
  border-top: 0.5px solid #0e0e0e;
  border-bottom: 0.5px solid #0e0e0e;
}

.body-works .footer {
  background: #0e0e0e;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  color: #777;
}

.body-works .footer .nav-link {
  color: #999;
}

.body-works .footer .nav-link:hover {
  color: var(--brand-blue);
}

/* Works grid on works page */
.works-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #0e0e0e;
  border-top: 0.5px solid #0e0e0e;
  border-bottom: 0.5px solid #0e0e0e;
  min-height: 400px;
}

.works-page-grid .work-card {
  aspect-ratio: 3 / 2;
}

/* 剧院物料：该分类下没有成系列的项目分组，选中时不做项目卡片，
   直接把该分类的全部图片平铺成一整面墙（内容由 works.js 注入）。
   与 .works-page-grid 同为 body 直接子元素，同样是通栏铺满。 */
.works-page-grid.hidden { display: none; }

.theater-grid {
  display: grid;
  /* 一排 3 个（窄屏降为 2，见下方媒体查询） */
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #0e0e0e;
  border-top: 0.5px solid #0e0e0e;
  border-bottom: 0.5px solid #0e0e0e;
}

/* 切换分类时整面墙隐藏（.work-card.hidden 只管卡片，这里要单独写） */
.theater-grid.hidden { display: none; }

.theater-item {
  /* 统一 3:2 比例框，与作品卡片一致 */
  aspect-ratio: 3 / 2;
  margin: 0;
  background: #0e0e0e;
  cursor: zoom-in;
  overflow: hidden;
  display: block;
}

.theater-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* 铺满 3:2 的框（比例不同的图会裁掉少量边缘） */
  display: block;
  transition: opacity .35s var(--ease, ease);
}

.theater-item:hover img { opacity: .82; }

/* 剧院墙基类已是 3 列，原来的「≤1200px 降为 3 列」因此成了重复规则，已删除；
   往下只剩一档：≤900px 降 2 列（≤768px 那条沿用原有规则，位置在后 → 级联正确） */
@media (max-width: 900px) {
  .theater-grid { grid-template-columns: repeat(2, 1fr); }
}

.works-page-grid .work-card .card-content {
  padding: 48px 36px 36px;
}

.work-card.hidden {
  display: none;
}

/* ---------- Project Detail Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0e0e0e;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(24, 24, 24, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.overlay-close {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--duration) var(--ease);
  padding: 8px;
}

.overlay-close:hover {
  color: #fff;
}

.overlay-close .close-icon {
  width: 16px;
  height: 16px;
  position: relative;
}

.overlay-close .close-icon::before,
.overlay-close .close-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}

.overlay-close .close-icon::before {
  transform: rotate(45deg);
}

.overlay-close .close-icon::after {
  transform: rotate(-45deg);
}

.overlay-counter {
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
}

.overlay-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 32px 120px;
}

.overlay-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.overlay-title {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--brand-blue);
  white-space: pre-line;
}

.overlay-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #777;
  text-transform: uppercase;
}

.meta-value {
  font-size: 14px;
  color: #b0b0b0;
}

.overlay-description {
  font-size: 16px;
  line-height: 1.8;
  color: #b0b0b0;
  white-space: pre-line;
}

.overlay-images {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overlay-images img {
  width: 100%;
  height: auto;
}

.overlay-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.overlay-prev,
.overlay-next {
  font-size: 14px;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  transition: color var(--duration) var(--ease);
}

.overlay-prev:hover,
.overlay-next:hover {
  color: #fff;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 560ms; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 640ms; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 720ms; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile Nav ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #0e0e0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav .nav-link {
  font-size: 24px;
  font-weight: 300;
  color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .header-inner { padding: 0 24px; }

  .studio-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .studio-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .overlay-info {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .container { padding: 0 20px; }
  .header-inner { padding: 0 20px; }

  .nav-list { display: none; }
  .menu-toggle { display: flex; }

  .hero { padding: 100px 20px 60px; }

  .cat-nav-bar { padding: 16px 20px; top: calc(50% + 120px); }
  .cat-nav-bar-inner { width: 100%; }

  .section { padding: 64px 0; }
  .section-header { flex-direction: column; gap: 16px; margin-bottom: 32px; }

  .works-grid,
  .works-page-grid {
    grid-template-columns: 1fr;
  }

  /* 剧院物料墙在窄屏保持两列，免得图片被放得太大 */
  .theater-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card { aspect-ratio: 4 / 3; }

  .studio { padding: 64px 0; }
  .studio-stats {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 40px;
    padding-top: 32px;
  }

  .contact { padding: 56px 20px; }
  .contact-label { margin-bottom: 18px; }
  .contact-email { margin-bottom: 22px; }
  .contact-socials { gap: 16px; }
  .contact-qr { margin-top: 28px; }
  .contact-qr img { width: 140px; height: 140px; }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .page-header { padding: 120px 0 32px; }

  .overlay-content { padding: 32px 20px 80px; }
  .overlay-header { padding: 16px 20px; }
}

@media (hover: none) {
  .work-card .card-content { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 36px; }
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: 12px; }
  .cat-nav-bar-inner { gap: 6px; }
}

/* 视口偏矮时隐藏滚动指示线 */
@media (max-height: 700px) {
  .hero-scroll { display: none; }
}

/* ---------- Poster Gallery + Lightbox ----------
   原为 posters.html 内联样式，抽到此处以便
   作品页「全部」末尾的海报网格复用同一套 */
.poster-grid {
  display: grid;
  /* 固定一排 5 张（窄屏依次降为 4 / 3 / 2，见紧邻的媒体查询） */
  grid-template-columns: repeat(5, 1fr);
  gap: 0;                  /* 海报之间无缝衔接，连成整片 */
  padding: 0;
  max-width: none;
  margin: 0;
}

/* 注意：断点必须写在本基类之后 —— 写在文件前部的同名媒体查询会被这条基类覆盖 */
@media (max-width: 1200px) {
  .poster-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .poster-grid { grid-template-columns: repeat(3, 1fr); }
}

.poster-item {
  /* 统一比例框 —— 每张框一样大，行列永远对齐 */
  aspect-ratio: 1351 / 2000;
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
  display: block;
}

.poster-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 全图完整显示，绝不裁切 */
  display: block;
  transition: opacity .35s var(--ease, ease);
}

.poster-item:hover img { opacity: .82; }

.poster-lightbox {
  position: fixed; inset: 0;
  background: rgba(8, 8, 8, .94);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; cursor: zoom-out;
}
.poster-lightbox.active { display: flex; }
.poster-lightbox img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.poster-lb-stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  padding: 0 64px;
}
.poster-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px; height: 96px;
  padding: 0;
  border: none;
  background: none;                 /* 不画方块底，只留一个细箭头 */
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color .25s var(--ease, ease), transform .25s var(--ease, ease);
  display: flex; align-items: center; justify-content: center;
  user-select: none;
  z-index: 2;
}
.poster-lb-arrow svg {
  width: 46px; height: 46px;        /* 尖括号放大，线宽 1 保持超细 */
  display: block;
}
.poster-lb-arrow:hover {
  background: none;
  color: rgba(255, 255, 255, 0.95);
}
.poster-lb-prev { left: 18px; }
.poster-lb-next { right: 18px; }
.poster-lb-prev:hover { transform: translateY(-50%) translateX(-5px); }
.poster-lb-next:hover { transform: translateY(-50%) translateX(5px); }

@media (max-width: 768px) {
  .poster-lb-stage { padding: 0 48px; }
  .poster-lb-arrow { width: 48px; height: 72px; }
  .poster-lb-arrow svg { width: 34px; height: 34px; }
  .poster-lb-prev { left: 8px; }
  .poster-lb-next { right: 8px; }
  .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 0; padding: 0; }
}

/* 作品页「全部」末尾的海报区块
   —— 与上方案例网格无缝衔接（去掉 24px 上留白）。
   无缝 + 通栏的定义已上移到 .poster-grid 基类，海报页与作品页两处保持一致 */
.works-posters {
  border-top: 0.5px solid #0e0e0e;
  padding-top: 0;
}
/* 注意：.work-card.hidden 的选择器只作用于卡片，
   海报区块要单独写，否则淡化筛选时藏不掉 */
.works-posters.hidden { display: none; }

/* ---------- Filler Card（网格末尾补位，避免空框） ---------- */
.work-card.filler-card {
  background: #0e0e0e;
  cursor: pointer;
}
.work-card.filler-card .filler-text {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.4s var(--ease);
}
.work-card.filler-card:hover .filler-text {
  color: var(--brand-blue);
}
