/* ============================================================
   山海经 · 子页共享样式（与主页对齐）
   ============================================================ */
:root {
  --bg-0: #05060a;
  --bg-1: #0b0c12;
  --bg-2: #12131c;
  --bg-3: #1a1c28;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text: rgba(255,255,255,0.92);
  --text-2: rgba(255,255,255,0.62);
  --text-3: rgba(255,255,255,0.38);
  --text-4: rgba(255,255,255,0.20);
  --accent: #C4354A;
  --accent-glow: rgba(196,53,74,0.5);
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif-cn: "Noto Serif SC", "Songti SC", serif;
  --serif-en: "Cormorant Garamond", serif;
  --display: "Syne", "Noto Serif SC", serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body { min-height: 100vh; position: relative; }
a { color: inherit; text-decoration: none; }

/* Grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5,6,10,0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
}
.nav__brand { position: relative; width: 400px; height: 44px; }
.nav__mark {
  position: absolute;
  top: calc(50% + 2px); left: 0;
  transform: translateY(-50%);
  width: 252px; height: 63px;
  background-image: url('assets/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  flex-shrink: 0;
  font-size: 0;
  color: transparent;
  pointer-events: none;
}
.nav__brand-cn, .nav__brand-en { display: none; }
.nav__links { display: flex; align-items: center; gap: 38px; }
.nav__link {
  position: relative;
  font-family: var(--display); font-size: 13px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-2);
  transition: color .3s;
}
.nav__link::after {
  content: ''; position: absolute;
  bottom: -6px; left: 0; width: 0; height: 1px;
  background: var(--accent);
  transition: width .4s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { width: 100%; }
.nav__lang {
  display: flex; gap: 6px; align-items: center;
  border: 1px solid var(--line-strong);
  padding: 3px; border-radius: 999px;
}
.nav__lang button {
  background: none; border: none; cursor: pointer;
  font: 500 11px/1 var(--display);
  letter-spacing: .14em; padding: 5px 11px;
  border-radius: 999px; color: var(--text-2);
}
.nav__lang button.is-active { background: var(--text); color: #000; }

/* 旧的 820px 隐藏规则已移除，改为下方统一的汉堡菜单 */

/* ============================================================
   Subnav · 子页标签
   ============================================================ */
.subnav {
  position: sticky; top: 72px; z-index: 40;
  background: rgba(5,6,10,0.85);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.subnav__inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 var(--pad);
  display: flex; gap: clamp(24px,4vw,56px);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a {
  position: relative;
  padding: 18px 0;
  font-family: var(--display);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  transition: color .3s;
}
.subnav a::after {
  content: "";
  position: absolute; bottom: -1px; left: 50%;
  width: 0; height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .4s var(--ease);
}
.subnav a:hover { color: var(--text); }
.subnav a.is-active { color: var(--accent); }
.subnav a.is-active::after { width: 28px; }

/* ============================================================
   Sub-hero
   ============================================================ */
.sub-hero {
  padding: 140px var(--pad) 70px;
  position: relative; overflow: hidden;
  isolation: isolate;
}
.sub-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 60% 40% at 30% 30%, rgba(196,53,74,0.12), transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(100,40,200,0.08), transparent 60%),
    linear-gradient(180deg, #05060a 0%, #0a0810 60%, #05060a 100%);
}
.sub-hero__inner {
  max-width: 1280px; margin: 0 auto;
  position: relative;
}
.back-link {
  display: inline-block;
  font-family: var(--display); font-size: 11px;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
  transition: color .3s;
}
.back-link:hover { color: var(--accent); }
.sub-hero__eyebrow {
  font-family: var(--display); font-size: 11px;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.sub-hero h1 {
  font-family: var(--serif-cn); font-weight: 500;
  font-size: clamp(44px, 7vw, 96px);
  line-height: .98; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.sub-hero h1 em {
  font-family: var(--serif-en); font-style: italic;
  color: var(--accent); font-weight: 500;
}
.sub-hero__dek {
  font-family: var(--serif-cn);
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--text-2); line-height: 1.7;
  max-width: 680px;
}

/* ============================================================
   Cinematic strip · 单幅横屏剧照
   ============================================================ */
.cinematic {
  padding: 0 var(--pad);
  margin: 0 auto;
  max-width: 1400px;
}
.cinematic img, .cinematic__frame {
  width: 100%;
  aspect-ratio: 16/8;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: border-color .3s;
}
.cinematic img:hover, .cinematic__frame:hover { border-color: var(--accent); }

/* ============================================================
   Content block · 长文正文
   ============================================================ */
.content {
  max-width: 900px; margin: 0 auto;
  padding: 100px var(--pad) 140px;
}
.content h2 {
  font-family: var(--serif-cn); font-weight: 500;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.15;
  margin: 70px 0 22px;
}
.content h2 em { font-family: var(--serif-en); font-style: italic; color: var(--accent); }
.content h2:first-child { margin-top: 0; }
.content h2 .label {
  display: block;
  font-family: var(--display); font-size: 11px;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  font-weight: 500;
}
.content p {
  font-family: var(--serif-cn);
  font-size: 16px; line-height: 1.95;
  color: var(--text-2);
  margin-bottom: 16px;
}
.content p em {
  font-family: var(--serif-en); font-style: italic; color: var(--text);
}
.content ul.highlight-list {
  list-style: none;
  display: grid; gap: 14px;
  margin: 18px 0 10px;
}
.content ul.highlight-list li {
  position: relative;
  padding-left: 28px;
  font-family: var(--serif-cn);
  font-size: 16px; line-height: 1.8;
  color: var(--text-2);
}
.content ul.highlight-list li::before {
  content: '';
  position: absolute; left: 0; top: 12px;
  width: 12px; height: 2px;
  background: var(--accent);
}
.content blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 0 10px 24px;
  margin: 30px 0;
  font-family: var(--serif-cn); font-style: italic;
  font-size: 18px; line-height: 1.75; color: var(--text);
}
.content .link-accent {
  color: var(--accent);
  font-family: var(--display);
  font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase;
  transition: opacity .3s;
}
.content .link-accent:hover { opacity: .75; }

/* Info grid */
.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 24px 0 40px;
}
@media (max-width: 760px){ .info-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px){ .info-grid { grid-template-columns: 1fr; } }
.info-cell {
  background: var(--bg-1);
  padding: 24px 22px;
}
.info-cell .label {
  font-family: var(--display); font-size: 10px;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.info-cell .value {
  font-family: var(--serif-cn); font-size: 17px;
  color: var(--text); line-height: 1.4;
}

/* Primary/ghost buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--display); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  transition: all .3s;
  cursor: pointer;
  background: transparent;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn--primary:hover { background: transparent; color: var(--accent); }

/* ============================================================
   Gallery · 图集页专属
   ============================================================ */
.gallery-mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.gallery-mosaic img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform .5s;
  border: 1px solid var(--line);
}
.gallery-mosaic img:hover { transform: scale(1.02); }
.gallery-mosaic > :nth-child(1) {
  grid-row: 1 / span 2;
  aspect-ratio: 3/4;
}
.gallery-mosaic > :nth-child(2),
.gallery-mosaic > :nth-child(3) {
  aspect-ratio: 16/9;
}
@media (max-width: 720px){
  .gallery-mosaic { grid-template-columns: 1fr; }
  .gallery-mosaic > :nth-child(1) { grid-row: auto; aspect-ratio: 16/10; }
}

.filmstrip-wrap {
  max-width: 1400px; margin: 0 auto;
  padding: 48px var(--pad);
  overflow: hidden;
}
.filmstrip {
  display: flex; gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip__item {
  flex: 0 0 clamp(280px, 36vw, 440px);
  aspect-ratio: 4/3;
  border: 1px solid var(--line);
  overflow: hidden;
  scroll-snap-align: center;
  transition: border-color .3s, transform .4s;
}
.filmstrip__item:hover { border-color: var(--accent); transform: translateY(-4px); }
.filmstrip__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}

.gallery-grid {
  max-width: 1400px; margin: 0 auto;
  padding: 20px var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.gallery-grid > div {
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color .3s;
}
.gallery-grid > div:hover { border-color: var(--accent); }
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform .5s;
  display: block;
}
.gallery-grid img:hover { transform: scale(1.04); }

/* Video card · 双源 */
.video-wrap {
  max-width: 1400px; margin: 0 auto;
  padding: 60px var(--pad) 100px;
}
.video-card {
  position: relative;
  aspect-ratio: 16/7;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(5,6,10,0.3), rgba(5,6,10,0.78)),
    url('assets/images/gallery/shanhai/R0000144-1c7315b0-2508-450b-b6c6-9e7ed2854271.png') center 40% / cover no-repeat;
  display: grid; place-items: center;
}
.video-card__play {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: grid; place-items: center;
  color: white; font-size: 22px;
}
.video-src {
  position: absolute; bottom: 22px; right: 26px;
  display: flex; gap: 10px;
}
.video-src-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(5,3,7,0.55);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.92);
  font-family: var(--display); font-size: 10.5px;
  letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer; border-radius: 999px;
  transition: all .25s ease;
}
.video-src-btn:hover {
  background: var(--accent); border-color: var(--accent);
  color: white;
}
.video-src-btn .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.video-card__label {
  position: absolute; bottom: 22px; left: 26px;
  font-family: var(--display); font-size: 11px;
  letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}
.video-card__label em {
  color: var(--accent); font-style: normal;
}

/* Video modal */
.video-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: none; place-items: center;
  padding: 40px;
}
.video-modal.is-open { display: grid; }
.video-modal__content {
  position: relative;
  width: min(1100px, 96vw);
  aspect-ratio: 16/9;
  background: #000;
}
.video-modal__close {
  position: absolute; top: -44px; right: 0;
  background: none; border: none;
  color: white; font-size: 32px; cursor: pointer;
  width: 36px; height: 36px; line-height: 1;
}
.video-modal iframe { width: 100%; height: 100%; border: 0; }

/* ============================================================
   Photo Lightbox
   ============================================================ */
.photo-lb {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.94);
  display: none;
  padding: 40px;
}
.photo-lb.is-open { display: block; }
.photo-lb__stage {
  position: absolute; inset: 40px;
  display: grid; place-items: center;
}
.photo-lb__img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  transition: opacity .2s;
}
.photo-lb__close,
.photo-lb__nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  cursor: pointer;
  transition: all .25s ease;
  display: grid; place-items: center;
}
.photo-lb__close {
  top: 22px; right: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 22px; line-height: 1;
}
.photo-lb__nav {
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  font-size: 20px; line-height: 1;
}
.photo-lb__nav--prev { left: 24px; }
.photo-lb__nav--next { right: 24px; }
.photo-lb__close:hover,
.photo-lb__nav:hover {
  background: #b87df8;
  border-color: #b87df8;
}
.photo-lb__cap {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  font-family: var(--display); font-size: 11px;
  letter-spacing: .28em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad);
}
.site-footer__inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 20px;
}
.site-footer__brand {
  font-family: var(--serif-cn); color: var(--text-2);
  font-size: 13px;
}
.site-footer__brand em {
  font-family: var(--serif-en); font-style: italic;
}
.site-footer__links {
  display: flex; gap: 24px;
}
.site-footer__links a {
  font-family: var(--display); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-3);
  transition: color .3s;
}
.site-footer__links a:hover { color: var(--accent); }

/* ============================================================
   Mobile · 汉堡菜单（与首页保持一致）
   ============================================================ */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 0;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 52;
}
.nav__burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform .3s ease, opacity .3s ease;
}
.nav.nav--open .nav__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.nav--open .nav__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__burger { display: flex; }
  .nav__links {
    display: flex !important;
    position: fixed; top: 0; left: 0; right: 0;
    min-height: 100vh; max-height: 100vh;
    padding: 96px var(--pad) 40px;
    background: rgba(5,6,10,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    flex-direction: column; align-items: stretch;
    gap: 0;
    z-index: 51;
    transform: translateY(-110%);
    transition: transform .45s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
    overflow-y: auto;
    counter-reset: navItem;
  }
  .nav.nav--open .nav__links {
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav__link {
    display: flex; align-items: baseline; gap: 20px;
    font-family: var(--serif-cn);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: none;
    padding: 16px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text);
  }
  .nav__link::before {
    counter-increment: navItem;
    content: counter(navItem, decimal-leading-zero);
    font-family: var(--display);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .3em;
    color: var(--text-3);
    min-width: 28px;
  }
  .nav__link::after {
    position: static;
    width: auto; height: auto;
    background: transparent;
    font-family: var(--serif-en);
    font-style: italic;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-3);
    margin-left: auto;
    letter-spacing: .01em;
    transition: none;
  }
  .nav__link[href*="works"]::after { content: "Works"; }
  .nav__link[href*="collaborate"]::after { content: "Collaborate"; }
  .nav__link[href*="about"]::after { content: "About"; }
  .nav__link[href*="collaborators"]::after { content: "Artists"; }
  .nav__link[href*="contact"]::after { content: "Contact"; }
  .nav__link.is-active,
  .nav__link.is-active::before { color: var(--accent); }
  .nav__lang { margin-top: 28px; align-self: flex-start; }
}
