/* 云生片场 · 黑底影院风
   原则：页面退后，片子在前。只用黑、白、灰；动效只有淡入、轻微放大、播放器开合。 */

:root {
  --bg: #0a0a0a;
  --bg-2: #111;
  --fg: #ededed;
  --muted: #8b8b8b;
  --dim: #555;
  --line: rgba(255, 255, 255, 0.1);
  --pad: clamp(20px, 4vw, 64px);
  --max: 1600px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-latin: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  animation: page-in 0.8s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
::selection { background: #fff; color: #000; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.en {
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 顶栏 ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-solid {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: baseline; gap: 12px; }
.logo b { font-weight: 500; font-size: 16px; letter-spacing: 0.24em; }
.logo .en { font-size: 10px; }
.nav { display: flex; gap: 40px; font-size: 14px; letter-spacing: 0.12em; }
.nav a { color: var(--muted); transition: color 0.3s; position: relative; }
.nav a:hover, .nav a.is-active { color: var(--fg); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0.12em; bottom: -6px; height: 1px; background: var(--fg);
}
.menu-btn { display: none; font-size: 13px; letter-spacing: 0.2em; }

/* ---------- 占位画面（无封面时用） ---------- */
.ph {
  --h: 210; --s: 12%;
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 28% 35%, hsl(var(--h) var(--s) 20%) 0%, transparent 60%),
    radial-gradient(90% 80% at 85% 90%, hsl(calc(var(--h) + 30) var(--s) 14%) 0%, transparent 55%),
    linear-gradient(160deg, hsl(var(--h) var(--s) 9%), #070707);
}
.ph::after { /* 胶片颗粒 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.09; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.ph-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-latin); font-size: 10px; letter-spacing: 0.3em; color: rgba(255,255,255,0.28);
  white-space: nowrap; text-transform: uppercase;
}

/* ---------- 首页大屏 ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media .ph { position: absolute; inset: -10%; --h: 205; --s: 14%; animation: drift 28s ease-in-out infinite alternate; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}
.hero::after { /* 底部压暗，保证文字可读 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,10,0.35) 0%, transparent 25%, transparent 55%, rgba(10,10,10,0.85) 100%);
}
.hero-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; text-align: center; }
.hero-label .en { color: rgba(255,255,255,0.3); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(32px, 6vh, 64px); z-index: 3;
}
.hero-foot .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 60px); line-height: 1.28; letter-spacing: 0.04em; }
.hero h1 + .en { margin-top: 18px; }
.reel-btn { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: 0.16em; flex-shrink: 0; }
.reel-btn i {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.45);
  display: grid; place-items: center; transition: background 0.4s var(--ease), border-color 0.4s;
}
.reel-btn i::before {
  content: ""; margin-left: 3px;
  border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.reel-btn:hover i { background: #fff; color: #000; border-color: #fff; }

/* ---------- 区块 ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section + .section { padding-top: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head h2 { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: 0.08em; }
.sec-head h2 .en { margin-left: 16px; }
.link-more { font-size: 13px; letter-spacing: 0.12em; color: var(--muted); transition: color 0.3s; }
.link-more:hover { color: var(--fg); }
.link-more::after { content: " →"; }

/* ---------- 作品卡片 ---------- */
.grid { display: grid; gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 28px); }
.grid-featured { grid-template-columns: repeat(2, 1fr); }
.grid-featured > :nth-child(1), .grid-featured > :nth-child(6) { grid-column: 1 / -1; }
.grid-featured > :nth-child(1) .card-media, .grid-featured > :nth-child(6) .card-media { aspect-ratio: 21 / 9; }
.grid-all { grid-template-columns: repeat(3, 1fr); }

.card { display: block; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.card-media > .ph, .card-media > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
}
.card:hover .card-media > .ph, .card:hover .card-media > img { transform: scale(1.03); }
.card-media > img { filter: brightness(0.92); }
.card:hover .card-media > img { filter: brightness(1); }
.card-info { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; }
.card-info h3 { font-size: 16px; letter-spacing: 0.06em; }
.card-info p { font-size: 13px; color: var(--muted); white-space: nowrap; }
.grid-featured > :nth-child(1) .card-info h3, .grid-featured > :nth-child(6) .card-info h3 { font-size: 20px; }
.card.is-hidden { display: none; }

/* ---------- 首页简介 ---------- */
.intro { border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.intro p { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.8; color: #cfcfcf; max-width: 880px; }
.intro .link-more { display: inline-block; margin-top: 32px; }

/* ---------- 内页标题 ---------- */
.page-head { padding: clamp(140px, 18vw, 220px) 0 clamp(40px, 5vw, 72px); }
.page-head h1 { font-size: clamp(36px, 5vw, 72px); letter-spacing: 0.06em; line-height: 1.2; }
.page-head .en { display: block; margin-top: 16px; }
.page-head .count { color: var(--dim); font-size: 0.4em; vertical-align: super; margin-left: 10px; letter-spacing: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-bottom: clamp(40px, 5vw, 64px); font-size: 14px; letter-spacing: 0.1em; }
.filters button { color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.filters button:hover { color: var(--fg); }
.filters button.is-active { color: var(--fg); border-bottom-color: var(--fg); }

/* ---------- 案例详情 ---------- */
.case-top { padding-top: 72px; }
.case-player { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 72px); width: 100%; margin: 0 auto; background: #000; cursor: pointer; overflow: hidden; }
.case-player > .ph, .case-player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-player .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 84px; height: 84px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5);
  display: grid; place-items: center; transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.case-player .play::before { content: ""; margin-left: 4px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.case-player:hover .play { background: rgba(255,255,255,0.1); transform: translate(-50%, -50%) scale(1.06); }

.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: 48px clamp(32px, 6vw, 120px); padding: clamp(48px, 6vw, 96px) 0; }
.case-body h1 { font-size: clamp(30px, 3.6vw, 52px); letter-spacing: 0.06em; line-height: 1.25; }
.case-body .lead { margin-top: 24px; color: #bdbdbd; font-size: 16px; line-height: 1.9; max-width: 560px; }
.meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; margin: 0; align-content: start; }
.meta div { border-top: 1px solid var(--line); padding-top: 14px; }
.meta dt { font-size: 12px; color: var(--muted); letter-spacing: 0.14em; margin-bottom: 6px; }
.meta dd { margin: 0; font-size: 16px; }

.case-nav { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.case-nav a { padding: clamp(32px, 4vw, 56px) 0; display: block; transition: opacity 0.3s; }
.case-nav a + a { text-align: right; border-left: 1px solid var(--line); }
.case-nav a:hover { opacity: 0.65; }
.case-nav .en { display: block; margin-bottom: 10px; }
.case-nav b { font-weight: 400; font-size: clamp(18px, 2vw, 28px); letter-spacing: 0.06em; }

/* ---------- 关于 ---------- */
.statement { font-size: clamp(26px, 3.4vw, 48px); line-height: 1.5; letter-spacing: 0.04em; max-width: 1100px; }
.about-text { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; margin-top: clamp(56px, 7vw, 96px); }
.about-text p { color: #bdbdbd; font-size: 16px; line-height: 2; max-width: 720px; }
.about-text p + p { margin-top: 1.2em; }

.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: grid; grid-template-columns: 80px 1fr 2fr; gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.services .no { font-family: var(--font-latin); font-size: 12px; color: var(--dim); letter-spacing: 0.1em; }
.services h3 { font-size: clamp(18px, 1.6vw, 22px); letter-spacing: 0.08em; }
.services p { color: var(--muted); }

.clients { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.clients span {
  aspect-ratio: 3 / 2; display: grid; place-items: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--font-latin); font-size: 11px; letter-spacing: 0.24em; color: var(--dim);
  transition: color 0.3s;
}
.clients span:hover { color: var(--fg); }

/* ---------- 联系 ---------- */
.contact { display: grid; grid-template-columns: 2fr 1fr; gap: 64px; align-items: end; }
.contact-list { display: grid; gap: 36px; }
.contact-list dt { font-size: 12px; color: var(--muted); letter-spacing: 0.16em; margin-bottom: 8px; }
.contact-list dd { margin: 0; font-size: clamp(18px, 2vw, 28px); letter-spacing: 0.04em; }
.contact-list a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease); }
.contact-list a:hover { background-size: 100% 1px; }
.qr { width: 180px; justify-self: end; }
.qr .ph { aspect-ratio: 1; --h: 0; --s: 0%; border: 1px solid var(--line); }
.qr p { margin-top: 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.14em; text-align: center; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 13px; color: var(--muted); }
.footer .row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer .row + .row { margin-top: 32px; font-size: 12px; color: var(--dim); }
.footer nav { display: flex; gap: 32px; }
.footer a { transition: color 0.3s; }
.footer a:hover { color: var(--fg); }

/* ---------- 播放器浮层 ---------- */
.player {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; place-items: center; padding: 64px var(--pad);
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.player.is-open { opacity: 1; visibility: visible; }
.player-stage { width: 100%; max-width: 1600px; aspect-ratio: 16 / 9; max-height: 100%; position: relative; transform: scale(0.98); transition: transform 0.6s var(--ease); }
.player.is-open .player-stage { transform: scale(1); }
.player-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-stage video { background: #000; }
.player-close { position: absolute; top: 20px; right: var(--pad); font-size: 13px; letter-spacing: 0.2em; color: var(--muted); transition: color 0.3s; z-index: 2; }
.player-close:hover { color: var(--fg); }
.player-title { position: absolute; left: var(--pad); top: 22px; font-size: 13px; letter-spacing: 0.12em; color: var(--muted); }
body.is-locked { overflow: hidden; }

/* ---------- 淡入 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 平板 ---------- */
@media (max-width: 1024px) {
  .grid-all { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 手机 ---------- */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .header .wrap { height: 60px; }
  .logo .en { display: none; }
  .menu-btn { display: block; position: relative; z-index: 60; }
  .nav {
    position: fixed; inset: 0; z-index: 55; background: var(--bg);
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px;
    padding: 0 var(--pad); font-size: 28px; letter-spacing: 0.1em;
    opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav a.is-active::after { display: none; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  .hero-foot .wrap { flex-direction: column; align-items: flex-start; }
  .grid-featured, .grid-all { grid-template-columns: 1fr; }
  .grid-featured > :nth-child(1) .card-media, .grid-featured > :nth-child(6) .card-media { aspect-ratio: 16 / 9; }
  .card-info { flex-direction: column; gap: 2px; }
  .intro, .about-text, .case-body, .contact { grid-template-columns: 1fr; }
  .case-top { padding-top: 60px; }
  .services li { grid-template-columns: 48px 1fr; }
  .services li p { grid-column: 2; }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav a + a { text-align: left; border-left: 0; border-top: 1px solid var(--line); }
  .qr { justify-self: start; }
  .footer nav { gap: 20px; }
}

/* 详情页：占位文字移到播放键下方，避免重叠 */
.case-player .ph-label { top: calc(50% + 72px); }

/* ---------- 竖屏片 ---------- */
.card.is-portrait .card-media { max-width: 460px; }
.case-player.is-portrait,
.player.is-portrait .player-stage {
  aspect-ratio: 9 / 16;
  width: auto;
  height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
  max-width: 100%;
  margin: 0 auto;
}
.player.is-portrait .player-stage { height: min(calc(100vh - 128px), 900px); max-height: calc(100vh - 128px); }
.case-top { display: flex; justify-content: center; background: #000; }
@media (max-width: 720px) {
  .card.is-portrait .card-media { max-width: none; }
  .case-player.is-portrait { height: auto; width: 100%; }
}

/* ---------- 作品页：瀑布流，横竖混排不留空档 ---------- */
.grid-all { display: block; columns: 3; column-gap: clamp(16px, 2vw, 28px); }
.grid-all .card { display: block; break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 clamp(32px, 4vw, 56px); }
.grid-all .card-media { width: 100%; }
.grid-all .card.is-portrait .card-media { max-width: none; }
@media (max-width: 1024px) { .grid-all { columns: 2; } }
@media (max-width: 720px) { .grid-all { columns: 1; } }
