/* ==========================================================================
   启枫 · 作品站 2026 — 全局样式
   token 来源：docs/design-spec.md 第 1–3 节
   ========================================================================== */

:root {
  /* 网格 */
  --grid-cols: 12;
  --grid-margin: clamp(20px, 4vw, 80px);
  --grid-gutter: clamp(12px, 1.5vw, 24px);
  --content-max: 1680px;

  /* 间距 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 16px; --sp-4: 24px;
  --sp-5: 32px; --sp-6: 48px; --sp-7: 64px; --sp-8: 96px;
  --section-gap: clamp(96px, 12vh, 200px);
  --block-gap: clamp(48px, 6vh, 96px);

  /* 字体 */
  --display: 'Noto Sans SC', sans-serif;
  --sans: 'Noto Sans SC', sans-serif;
  --mono: 'Space Grotesk', ui-monospace, monospace;

  --fs-hero:  clamp(2.6rem, 7.5vw, 7rem);
  --fs-h1:    clamp(1.7rem, 4vw, 3.5rem);
  --fs-h2:    clamp(1.3rem, 2.2vw, 2rem);
  --fs-h3:    clamp(1.05rem, 1.4vw, 1.35rem);
  --fs-body:  clamp(0.92rem, 1vw, 1.06rem);
  --fs-meta:  0.78rem;
  --fs-label: 0.68rem;

  /* 配色 */
  --bg: #f5f3ef;
  --ink: #141414;
  --muted: #787068;
  --light: #a8a099;
  --divider: #ddd8d0;
  --card: #eae6e0;
  --accent: #e05a45;
  --dark-bg: #101010;
  --dark-ink: #f5f3ef;
  --dark-muted: #9a9a9a;

  /* 缓动 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-s: .4s;
  --dur-m: .8s;
  --radius: 12px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
html.lenis { scroll-behavior: auto; }
html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(100% - var(--grid-margin) * 2, var(--content-max));
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: var(--grid-gutter);
}
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 300;
  padding: 10px 16px; background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* 排版原语 --------------------------------------------------------------- */
.t-label {
  font-family: var(--mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  color: var(--light);
}
.t-meta {
  font-family: var(--mono); font-size: var(--fs-meta); font-weight: 500;
  letter-spacing: .04em; line-height: 1.5; color: var(--muted);
}
.t-body { font-size: var(--fs-body); font-weight: 300; line-height: 1.75; }

/* ============================ PRELOADER (M1) ============================ */
.preloader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--sp-6) var(--grid-margin);
  clip-path: inset(0 0 0 0);
}
.preloader[hidden] { display: none; }
.pl-bar { height: 1px; background: var(--divider); position: relative; margin-bottom: var(--sp-5); }
.pl-bar i { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--ink); display: block; }
.pl-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); }
.pl-name { font-family: var(--display); font-weight: 900; font-size: var(--fs-h2); letter-spacing: -.02em; line-height: 1.1; }
.pl-num { font-family: var(--mono); font-weight: 700; font-size: clamp(2.4rem, 9vw, 6rem); line-height: .9; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ============================== HEADER (M9) ============================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--grid-margin);
  transition: background var(--dur-s) var(--ease), backdrop-filter var(--dur-s) var(--ease),
              padding var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}
.header.is-solid {
  background: rgba(245, 243, 239, .82);
  backdrop-filter: blur(20px);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--divider);
}
.header.is-hidden { transform: translateY(-100%); }
.header-logo { font-family: var(--mono); font-size: .95rem; font-weight: 700; letter-spacing: -.02em; }
.header-nav { display: flex; gap: var(--sp-5); }
.header-nav a { position: relative; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.header-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-s) var(--ease);
}
.header-nav a:hover, .header-nav a:focus-visible { color: var(--ink); }
.header-nav a:hover::after, .header-nav a:focus-visible::after { transform: scaleX(1); }
@media (max-width: 768px) { .header-nav { display: none; } }

/* ================================ HERO ================================= */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--sp-8) + 40px) 0 var(--sp-8);
  position: relative;
}
.hero-kicker { margin-bottom: var(--sp-5); }
.hero-title {
  font-family: var(--display); font-weight: 900;
  font-size: var(--fs-hero); line-height: 1.02; letter-spacing: -.03em;
  margin-bottom: var(--sp-5);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; will-change: transform; }
.hero-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-7);
  align-items: flex-end; justify-content: space-between;
}
.hero-sub { max-width: 42ch; color: var(--muted); font-size: var(--fs-body); }
.hero-id { font-family: var(--mono); font-size: var(--fs-meta); color: var(--muted); letter-spacing: .04em; }
.hero-id em { font-style: normal; color: var(--accent); }
.hero-note { margin-top: var(--sp-3); }
.hero-scroll {
  position: absolute; left: 50%; bottom: var(--sp-5); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
}
.scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--light), transparent);
  animation: pulse 2.4s 1.2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: .35; transform: scaleY(1); } 50% { opacity: .9; transform: scaleY(1.25); } }

/* ============================ 暗区（About / Contact） ==================== */
.zone-dark { background: var(--dark-bg); color: var(--dark-ink); }
.zone-dark .t-label { color: var(--dark-muted); }
.zone-dark .t-meta { color: var(--dark-muted); }
body.bg-scrub .zone-dark { background: transparent; }
/* 详情弹层独立滚动，不参与首页 body 底色 scrub —— 暗区必须自带实底，否则浅色文字浮在浅背景上不可见 */
body.bg-scrub #detail .zone-dark { background: var(--dark-bg); }

section { padding-block: var(--section-gap); }

.sec-head { margin-bottom: var(--block-gap); }
.sec-no { margin-bottom: var(--sp-3); }
.sec-title {
  font-family: var(--display); font-weight: 900;
  font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -.02em;
}
.sec-lede {
  margin-top: var(--sp-4); max-width: 56ch;
  font-size: var(--fs-body); color: var(--muted); line-height: 1.75;
}
.zone-dark .sec-lede { color: var(--dark-muted); }

/* About ------------------------------------------------------------------ */
.about { position: relative; overflow: hidden; }
.about-watermark {
  position: absolute; top: clamp(24px, 6vh, 90px); right: -.04em;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(5rem, 18vw, 17rem); line-height: .8;
  letter-spacing: -.04em; color: rgba(245, 243, 239, .045);
  pointer-events: none; white-space: nowrap; user-select: none;
}
.about-inner { position: relative; }
.about-contact {
  font-family: var(--mono); font-size: var(--fs-meta); letter-spacing: .12em;
  color: var(--dark-muted); margin-bottom: var(--block-gap);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
}
.about-contact a:hover { color: var(--dark-ink); }
.about-split { row-gap: var(--block-gap); align-items: start; }
.about-text { grid-column: 1 / 8; }
.about-photo-col { grid-column: 9 / 13; }
.manifesto { font-family: var(--display); font-weight: 900; font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -.02em; }
.manifesto .m-line { display: block; }
.manifesto .m-line.small { font-size: var(--fs-h2); font-weight: 700; color: var(--dark-muted); margin-top: var(--sp-4); line-height: 1.5; }
.about-lede { margin-top: var(--sp-5); max-width: 46ch; color: var(--dark-muted); font-size: var(--fs-body); }
.about-photo { width: 100%; border-radius: var(--radius); }
.about-photo-cap { margin-top: var(--sp-3); }

.timeline { margin-top: var(--block-gap); border-top: 1px solid #2a2a2a; }
.tl-row {
  display: grid; grid-template-columns: minmax(120px, 2fr) 3fr 5fr;
  gap: var(--sp-4); align-items: baseline;
  padding: var(--sp-4) 0; border-bottom: 1px solid #2a2a2a;
  transition: background var(--dur-s) var(--ease), padding-inline var(--dur-s) var(--ease);
}
.tl-row:hover { background: rgba(245, 243, 239, .04); padding-inline: var(--sp-3); }
.tl-year { font-family: var(--mono); font-size: var(--fs-meta); font-weight: 700; color: var(--dark-muted); letter-spacing: .04em; }
.tl-role { font-weight: 700; font-size: var(--fs-h3); }
.tl-co { font-size: var(--fs-body); color: var(--dark-muted); }

.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--block-gap); }
.tag {
  font-family: var(--mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 16px; border: 1px solid #333; border-radius: 100px; color: var(--dark-muted);
  transition: color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.tag:hover { color: var(--dark-ink); border-color: var(--dark-ink); }

/* ======================== BANNER 图墙（M5 横向） ======================== */
.wall-note {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em;
  color: var(--muted); margin-bottom: var(--sp-5);
}
.wall-note::before { content: ""; width: 20px; height: 2px; border-radius: 999px; background: var(--ink); opacity: .5; }

.feeds-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4) var(--sp-7); margin-bottom: var(--sp-5);
}
.feeds-head .wall-note { margin-bottom: 0; max-width: 68ch; }
.feeds-stat { display: flex; gap: var(--sp-6); flex: 0 0 auto; }
.feeds-stat b {
  display: block; font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.9rem); line-height: 1; letter-spacing: -.03em;
}
.feeds-stat span {
  display: block; margin-top: var(--sp-2);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .1em;
  text-transform: uppercase; color: var(--light);
}

/* 无缝拼接图墙：justified 行布局（JS 精确排布），统一 3px 缝隙、外轮廓严格矩形 */
.feeds { --wall-gap: 3px; position: relative; }
.feeds-viewport { overflow: hidden; }
.feeds-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.feeds.is-native .feeds-viewport {
  overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-3);
}
.feeds-track {
  display: flex; flex-direction: column; gap: var(--wall-gap);
  padding-inline: var(--grid-margin); width: max-content;
}
.feed-row { display: flex; gap: var(--wall-gap); }

.feed-item {
  position: relative; overflow: hidden; flex: 0 0 auto;
  background: var(--card);
}
.feed-media { position: relative; overflow: hidden; width: 100%; height: 100%; }
.feed-media img {
  width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;
  transition: transform var(--dur-s) var(--ease);
}
.feed-item:hover .feed-media img, .feed-item:focus-within .feed-media img { transform: scale(1.045); }
.feed-media.is-scene {
  background: #171614;
  display: flex; align-items: center; justify-content: center;
  padding: 6% 12%;
}
.feed-media.is-scene .device { border-radius: 6px; box-shadow: 0 14px 32px -16px rgba(0, 0, 0, .85); }

/* JS 未接管时的兜底：单行 filmstrip，保持等高无缝 */
.feeds-track:not(.is-justified) { flex-direction: row; align-items: stretch; }
.feeds-track:not(.is-justified) .feed-item { height: min(52vh, 440px); }
.feeds-track:not(.is-justified) .feed-media { height: 100%; width: auto; }
.feeds-track:not(.is-justified) .feed-media img { width: auto; height: 100%; }
.feeds-track:not(.is-justified) .feed-media.is-scene { aspect-ratio: 1 / 1.3; }

.feed-tag {
  position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 2;
  padding: 4px 8px; border-radius: 100px;
  background: rgba(16, 16, 16, .62); backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: .58rem; letter-spacing: .08em;
  text-transform: uppercase; color: #f5f3ef; white-space: nowrap;
}
.feed-name {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding: 30px var(--sp-3) var(--sp-3);
  background: linear-gradient(to top, rgba(12, 12, 12, .9), rgba(12, 12, 12, .5) 48%, transparent);
  font-family: var(--mono); font-size: var(--fs-label); line-height: 1.4;
  letter-spacing: .03em; color: #f5f3ef;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}
.feed-item:hover .feed-name, .feed-item:focus-within .feed-name { opacity: 1; transform: translateY(0); }

.feeds-foot { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-5); }
.feeds-progress { flex: 1 1 auto; height: 1px; background: var(--divider); position: relative; }
.feeds-progress i { position: absolute; inset: 0 auto 0 0; width: 3%; background: var(--accent); display: block; }
.feeds-hint { flex: 0 0 auto; }
.fh-touch { display: none; }
@media (hover: none) {
  .fh-desk { display: none; }
  .fh-touch { display: inline; }
  .feed-name { opacity: 1; transform: none; }
  .feed-item:hover .feed-media img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-name { opacity: 1; transform: none; transition: none; }
  .feed-media img, .feed-item:hover .feed-media img { transform: none; transition: none; }
}

/* 设备骨架屏（沿用现站结构，卡片化） ------------------------------------- */
.device {
  position: relative; width: 100%; border-radius: 20px; overflow: hidden;
  background: #0d0c0b; box-shadow: 0 20px 48px -20px rgba(20, 18, 15, .4);
}
.device.r-home, .device.r-camp { aspect-ratio: 1 / 1.18; }
.device.r-splash { aspect-ratio: 1 / 1.44; }
.device.r-popup { aspect-ratio: 1 / 1.32; }
.s-home, .s-popup { position: absolute; inset: 0; background: #f6f5f2; }
.s-splash { position: absolute; inset: 0; background: #000; }
.s-camp { position: absolute; inset: 0; background: linear-gradient(180deg, #c62828 0%, #8e1c1c 55%, #6d1414 100%); }
.skbar { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; padding: 13px 16px 0; }
.sk-time { display: block; width: 30px; height: 9px; border-radius: 999px; background: #ddd7cd; }
.skbar span { display: flex; gap: 4px; align-items: center; }
.skbar span i { display: block; height: 8px; width: 11px; border-radius: 2px; background: #ddd7cd; }
.skbar span i.wide { width: 17px; border-radius: 3px; }
.skbar.light .sk-time, .skbar.light span i { background: rgba(255, 255, 255, .55); }
.sk-search { margin: 38px 12px 10px; height: 34px; border-radius: 999px; background: #e9e4db; position: relative; z-index: 2; }
.sk-promo { margin: 10px 12px 0; height: 32px; border-radius: 10px; background: #e9e4db; position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.sk-promo .l { width: 52%; height: 9px; border-radius: 999px; background: #d8d2c7; }
.sk-promo .b { width: 44px; height: 18px; border-radius: 999px; background: #d8d2c7; }
.sk-jgw { display: flex; justify-content: space-between; padding: 16px 18px 14px; position: relative; z-index: 2; }
.sk-jgw span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sk-jgw .c { width: 42px; height: 42px; border-radius: 14px; background: #e9e4db; }
.sk-jgw .t { width: 26px; height: 7px; border-radius: 999px; background: #ddd7cd; }
.sk-cards { display: flex; gap: 10px; padding: 12px; position: relative; z-index: 2; }
.sk-card { flex: 1; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 5px rgba(20, 18, 15, .05); padding-bottom: 12px; }
.sk-card .im { display: block; aspect-ratio: 1 / .62; background: #e9e4db; }
.sk-card .l1 { display: block; margin: 10px 10px 0; height: 9px; border-radius: 999px; background: #e2dcd2; width: 82%; }
.sk-card .l2 { display: block; margin: 7px 10px 0; height: 9px; border-radius: 999px; background: #e9e4db; width: 45%; }
.h-hero, .c-hero { margin: 0 12px; border-radius: 12px; overflow: hidden; position: relative; z-index: 2; box-shadow: 0 6px 18px -6px rgba(20, 18, 15, .2); }
.h-hero img, .c-hero img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.sp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp-scrim { position: absolute; top: 0; left: 0; right: 0; height: 96px; z-index: 5; background: linear-gradient(180deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)); }
.sp-skip { position: absolute; top: 42px; right: 12px; z-index: 7; width: 64px; height: 26px; border-radius: 999px; background: rgba(0, 0, 0, .42); display: flex; align-items: center; justify-content: center; }
.sp-skip i { width: 38px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .6); }
.pp-dim { position: absolute; inset: 0; background: rgba(15, 12, 10, .4); z-index: 3; }
.pp-float { position: absolute; z-index: 4; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 80%; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .4)); }
.pp-close { position: absolute; z-index: 4; left: 50%; top: 92%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .75); color: rgba(255, 255, 255, .95); display: flex; align-items: center; justify-content: center; font-size: .78rem; }
.sk-nav { margin: 38px 14px 12px; display: flex; align-items: center; position: relative; z-index: 2; }
.sk-nav .back { width: 10px; height: 16px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.sk-nav .ttl { flex: 1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .38); margin: 0 26px; }
.sk-nav .dot { width: 16px; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.s-camp .sk-card { background: rgba(255, 255, 255, .14); box-shadow: none; }
.s-camp .sk-card .im { background: rgba(255, 255, 255, .22); }
.s-camp .sk-card .l1 { background: rgba(255, 255, 255, .3); }
.s-camp .sk-card .l2 { background: rgba(255, 255, 255, .2); }

/* ============================= 作品索引行 ============================== */
.work-list { border-top: 1px solid var(--divider); }
.work-row {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: var(--grid-gutter);
  align-items: center;
  text-align: left;
  padding: clamp(20px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--divider);
  position: relative;
  transition: background var(--dur-s) var(--ease), padding-inline var(--dur-s) var(--ease);
}
.work-row:hover, .work-row:focus-visible { background: var(--card); padding-inline: var(--sp-4); }
.work-key { grid-column: 1 / 2; font-family: var(--mono); font-size: var(--fs-meta); font-weight: 700; color: var(--light); }
.work-name {
  grid-column: 2 / 8;
  font-family: var(--display); font-weight: 900; font-size: var(--fs-h3);
  letter-spacing: -.01em; line-height: 1.3;
  transition: transform var(--dur-s) var(--ease), font-size var(--dur-s) var(--ease);
}
.work-row:hover .work-name, .work-row:focus-visible .work-name { transform: translateX(8px); font-size: var(--fs-h2); }
.work-desc { grid-column: 8 / 12; font-size: var(--fs-meta); color: var(--muted); line-height: 1.6; }
.work-end { grid-column: 12 / 13; display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); }
.work-core {
  font-family: var(--mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: 3px 9px; white-space: nowrap;
}
.work-arrow {
  font-family: var(--mono); font-size: 1.05rem; color: var(--light);
  transition: transform var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
}
.work-row:hover .work-arrow, .work-row:focus-visible .work-arrow { transform: translateX(8px) rotate(-45deg); color: var(--ink); }
.work-thumb { display: none; }

.hover-preview {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 320px; height: 200px; border-radius: 4px; overflow: hidden;
  pointer-events: none; opacity: 0; will-change: transform;
  box-shadow: 0 24px 60px -24px rgba(20, 18, 15, .5);
  background: var(--card);
}
.hover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ============================ CONTACT / FOOTER ========================== */
.contact { text-align: left; }
.contact-title { font-family: var(--display); font-weight: 900; font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.03em; }
.contact-links { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-7); margin-top: var(--block-gap); }
.contact-links a, .contact-links span {
  font-family: var(--mono); font-size: var(--fs-body); letter-spacing: .04em; color: var(--dark-muted);
  position: relative;
}
.contact-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-s) var(--ease);
}
.contact-links a:hover { color: var(--dark-ink); }
.contact-links a:hover::after { transform: scaleX(1); }
.footer-bar {
  margin-top: var(--section-gap); padding-top: var(--sp-4);
  border-top: 1px solid #2a2a2a;
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); justify-content: space-between;
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .1em;
  text-transform: uppercase; color: var(--dark-muted);
}
.to-top:hover { color: var(--dark-ink); }

/* ============================ 详情弹层 / case 版式 ====================== */
.detail {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform .5s var(--ease);
  visibility: hidden;
}
.detail.is-open { transform: translateY(0); visibility: visible; }
.detail-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-3) var(--grid-margin);
  background: rgba(245, 243, 239, .9); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
}
.back-btn { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-body); }
.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { color: var(--accent); }

/* case study 版式（弹层与独立页共用） */
.case-hero { position: relative; overflow: hidden; }
.case-hero-media { height: min(80vh, 720px); overflow: hidden; background: var(--card); }
.case-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.case-hero-copy { padding-block: var(--block-gap); }
.case-hero-nohero .case-hero-copy { padding-top: clamp(96px, 14vh, 160px); }
.case-title { font-family: var(--display); font-weight: 900; font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -.02em; }
.case-kicker { margin-bottom: var(--sp-4); }

/* 详情页首图：多图拼贴（1 主 + 2 辅），尺寸收敛，间距走 --grid-gutter */
.case-hero-pad { padding-top: clamp(76px, 12vh, 136px); }
.case-hero-collage {
  display: grid; grid-template-columns: 5fr 3fr; grid-template-rows: 1fr 1fr;
  gap: var(--grid-gutter); height: min(58vh, 540px);
}
.case-hero-collage .media { height: 100%; }
.case-hero-collage .media img { width: 100%; height: 100%; object-fit: cover; }
.case-hero-collage .chc-main { grid-row: 1 / 3; }
.case-hero-collage .chc-main:only-child { grid-column: 1 / -1; }
.case-hero-collage figure:nth-child(2):last-child { grid-row: 1 / 3; }
@media (max-width: 768px) {
  .case-hero-pad { padding-top: clamp(64px, 10vh, 96px); }
  .case-hero-collage { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .case-hero-collage .chc-main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; }
  .case-hero-collage figure:not(.chc-main) { aspect-ratio: 4 / 3; grid-row: auto; }
}

.meta-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5) var(--grid-gutter);
  padding-block: var(--sp-6);
  border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider);
}
.meta-cell dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--light); margin-bottom: var(--sp-2); }
.meta-cell dd { font-family: var(--mono); font-size: var(--fs-meta); color: var(--ink); letter-spacing: .02em; line-height: 1.6; }

.case-lede {
  grid-column: 3 / 11; font-size: var(--fs-h2); line-height: 1.5; font-weight: 300;
  padding-block: var(--section-gap);
}
.case-block { padding-block: var(--block-gap); }
.case-block > * + * { margin-top: var(--sp-5); }
.case-h2 { font-family: var(--display); font-weight: 900; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -.02em; }
.case-h2 em { font-style: normal; color: var(--accent); }
.case-text { grid-column: 4 / 10; font-size: var(--fs-body); color: var(--muted); line-height: 1.85; }
.case-narrow { grid-column: 3 / 11; }
.case-wide { grid-column: 1 / 13; }

.media { overflow: hidden; border-radius: var(--radius); background: var(--card); }
.media img { width: 100%; height: auto; }
.media.parallax { position: relative; }
.media.parallax img { will-change: transform; }
.m-full { width: 100%; border-radius: var(--radius); }
.m-contain { background: transparent; }
.m-contain img { width: 100%; height: auto; object-fit: contain; border-radius: var(--radius); }
.m-single { grid-column: 3 / 11; }
.m-dual { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-gutter); background: none; border-radius: 0; overflow: visible; }
.m-dual > .media:nth-child(2) { margin-top: 10vh; }
.m-multi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--grid-gutter); background: none; overflow: visible; }
.m-stack { display: grid; gap: var(--grid-gutter); grid-column: 2 / 12; background: none; overflow: visible; }
.cap { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; color: var(--light); margin-top: var(--sp-3); }

.zone-dark .cap { color: var(--dark-muted); }
.zone-dark .case-text { color: var(--dark-muted); }
.zone-dark .media { background: rgba(245, 243, 239, .06); }
.zone-dark .meta-cell dd { color: var(--dark-ink); }

/* 内容组件（沿用现站语义，桌面化重排） */
.layers { display: grid; gap: var(--sp-3); }
.layer { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); background: var(--card); border-radius: 10px; }
.zone-dark .layer { background: rgba(245, 243, 239, .08); }
.layer-dot { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.dot-bone { background: var(--accent); } .dot-meat { background: #e8973a; } .dot-skin { background: #4a8fd9; }
.layer-name { font-weight: 700; font-size: var(--fs-h3); }
.layer-desc { font-size: var(--fs-meta); color: var(--muted); }
.zone-dark .layer-desc { color: var(--dark-muted); }

.broken { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.broken-item { padding: var(--sp-4); border: 1px solid var(--divider); border-radius: 10px; }
.zone-dark .broken-item { border-color: rgba(245, 243, 239, .18); }
.broken-name { font-weight: 700; font-size: var(--fs-body); margin-bottom: var(--sp-1); }
.broken-name em { font-style: normal; color: var(--accent); font-family: var(--mono); font-size: var(--fs-label); margin-left: var(--sp-2); }
.broken-desc { font-size: var(--fs-meta); color: var(--muted); line-height: 1.6; }
.zone-dark .broken-desc { color: var(--dark-muted); }

.pairs { display: grid; gap: var(--sp-4); }
.pair { border-left: 2px solid var(--divider); padding-left: var(--sp-4); }
.zone-dark .pair { border-color: rgba(245, 243, 239, .2); }
.pair-pit { font-size: var(--fs-meta); color: var(--accent); margin-bottom: var(--sp-1); }
.pair-rule { font-size: var(--fs-body); line-height: 1.6; }

.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-6) var(--grid-gutter); }
.dat-num { font-family: var(--mono); font-size: clamp(1.9rem, 3.4vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.dat-label { font-family: var(--mono); font-size: var(--fs-label); color: var(--light); letter-spacing: .1em; text-transform: uppercase; margin-top: var(--sp-2); }
.zone-dark .dat-label { color: var(--dark-muted); }

.steps { display: grid; gap: var(--sp-4); }
.step { display: grid; grid-template-columns: 42px 1fr; gap: var(--sp-4); padding-block: var(--sp-3); border-top: 1px solid var(--divider); }
.zone-dark .step { border-color: rgba(245, 243, 239, .16); }
.step-no { font-family: var(--mono); font-size: var(--fs-meta); font-weight: 700; color: var(--light); }
.step-name { font-weight: 700; font-size: var(--fs-h3); }
.step-desc { font-size: var(--fs-meta); color: var(--muted); line-height: 1.7; margin-top: var(--sp-1); }
.zone-dark .step-desc { color: var(--dark-muted); }

.mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.matcell { border-radius: 14px; padding: var(--sp-3); background: linear-gradient(150deg, rgba(120, 110, 200, .14), rgba(230, 120, 180, .1)); display: flex; flex-direction: column; align-items: center; }
.matcell img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.matcell .matlbl { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; color: var(--muted); margin-top: var(--sp-2); }
.zone-dark .matcell { background: rgba(245, 243, 239, .06); }
.zone-dark .matcell .matlbl { color: var(--dark-muted); }

.live-link {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); border: 1px solid var(--divider); border-radius: var(--radius);
  background: var(--card);
  transition: transform var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.live-link:hover { transform: translateY(-2px); border-color: var(--ink); }
.zone-dark .live-link { background: rgba(245, 243, 239, .06); border-color: rgba(245, 243, 239, .18); }
.live-dot { width: 9px; height: 9px; border-radius: 999px; background: #3fae5a; flex-shrink: 0; animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(63, 174, 90, .5); } 70% { box-shadow: 0 0 0 8px rgba(63, 174, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 174, 90, 0); } }
.live-label { font-weight: 700; font-size: var(--fs-body); }
.live-host { font-family: var(--mono); font-size: var(--fs-label); color: var(--muted); letter-spacing: .04em; }
.zone-dark .live-host { color: var(--dark-muted); }
.live-go { font-family: var(--mono); font-size: 1.1rem; color: var(--light); }

.shot-ph {
  display: grid; place-items: center; gap: var(--sp-3);
  aspect-ratio: 16 / 9; border: 1px dashed var(--divider); border-radius: var(--radius);
  background: var(--card);
}
.zone-dark .shot-ph { background: rgba(245, 243, 239, .05); border-color: rgba(245, 243, 239, .18); }
.shot-ph .shot-t { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .1em; color: var(--light); }

/* 手机截图版式（420×909 竖屏素材专用） ----------------------------------- */
.case-sub { opacity: .75; max-width: 62ch; margin-top: var(--sp-4); }
/* 空行占位符作为 grid 直接子元素时独占整行，撑开标题与内容块的呼吸间距 */
.grid > .case-sub[aria-hidden] { grid-column: 1 / -1; }
.m-phones {
  grid-column: 1 / 13;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 280px));
  gap: var(--grid-gutter); justify-content: center;
}
.m-phones .media { border-radius: 18px; border: 1px solid var(--divider); box-shadow: 0 24px 60px -30px rgba(20, 18, 15, .35); }
.zone-dark .m-phones .media { border-color: rgba(245, 243, 239, .14); }
.case-hero-phones {
  background: var(--dark-bg);
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(16px, 3vw, 48px);
  padding: calc(var(--sp-8) + 40px) var(--grid-margin) var(--sp-8);
  overflow: hidden;
}
.case-hero-phones .phone {
  width: clamp(150px, 22vw, 300px); border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(245, 243, 239, .14);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
}
.case-hero-phones .phone:nth-child(2) { margin-top: clamp(24px, 6vh, 80px); }
.case-hero-phones .phone:nth-child(3) { margin-top: clamp(48px, 12vh, 160px); }
@media (max-width: 768px) {
  .m-phones { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .case-hero-phones .phone:nth-child(3) { display: none; }
}

/* Next Project (M10) ----------------------------------------------------- */
.next-project { display: block; border-top: 1px solid var(--divider); padding-block: var(--block-gap); }
.next-label { margin-bottom: var(--sp-4); }
.next-inner { display: grid; grid-template-columns: 1fr minmax(240px, 38%); gap: var(--sp-6); align-items: center; }
.next-title { font-family: var(--display); font-weight: 900; font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -.02em; position: relative; display: inline-block; }
.next-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-m) var(--ease);
}
.next-project:hover .next-title::after, .next-project:focus-visible .next-title::after { transform: scaleX(1); }
.next-desc { margin-top: var(--sp-3); font-size: var(--fs-meta); color: var(--muted); }
.next-media { overflow: hidden; border-radius: var(--radius); height: 40vh; min-height: 200px; background: var(--card); }
.next-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-m) var(--ease); }
.next-project:hover .next-media img, .next-project:focus-visible .next-media img { transform: scale(1.05); }

/* ============================== LIGHTBOX =============================== */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 9, 8, .95); display: none; }
.lightbox.is-open { display: block; }
.lb-strip {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-cell { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: start; scroll-snap-stop: always; padding: var(--sp-6); }
.lb-cell img { max-width: 100%; max-height: 100%; object-fit: contain; width: auto; }
.lb-close, .lb-nav { position: absolute; z-index: 3; color: #fff; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 72px; font-size: 26px; }
.lb-prev { left: 0; border-radius: 0 10px 10px 0; }
.lb-next { right: 0; border-radius: 10px 0 0 10px; }
.lb-count { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; color: rgba(255, 255, 255, .8); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; }
@media (hover: none) { .lb-nav { display: none; } }
[data-zoom] { cursor: zoom-in; }

/* ============================== 响应式 ================================= */
@media (max-width: 1279px) {
  .m-dual > .media:nth-child(2) { margin-top: 5vh; }
}

@media (max-width: 768px) {
  :root { --grid-cols: 1; --section-gap: clamp(64px, 9vh, 96px); --block-gap: 40px; }
  .grid { grid-template-columns: 1fr; row-gap: var(--sp-5); }
  .about-text, .about-photo-col { grid-column: 1 / -1; }
  .about-photo-col { max-width: 62%; }
  .tl-row { grid-template-columns: 1fr; gap: var(--sp-1); }
  .work-row { grid-template-columns: 28px 1fr auto; column-gap: var(--sp-3); row-gap: var(--sp-2); align-items: start; }
  .work-key { grid-column: 1; }
  .work-name { grid-column: 2; font-size: 1.05rem; }
  .work-row:hover .work-name { transform: none; font-size: 1.05rem; }
  .work-end { grid-column: 3; }
  .work-desc { grid-column: 2 / -1; }
  .work-thumb { display: block; grid-column: 1 / -1; margin-top: var(--sp-3); border-radius: 10px; overflow: hidden; background: var(--card); }
  .work-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .work-row:hover { padding-inline: 0; background: none; }
  .hover-preview { display: none; }
  .case-lede, .case-text, .case-narrow, .m-single, .m-stack { grid-column: 1 / -1; }
  .case-lede { font-size: var(--fs-h3); padding-block: var(--block-gap); }
  .m-dual, .m-multi, .mats { grid-template-columns: 1fr; }
  .m-dual > .media:nth-child(2) { margin-top: 0; }
  .meta-bar { grid-template-columns: 1fr 1fr; }
  .next-inner { grid-template-columns: 1fr; }
  .next-media { height: 32vh; }
  .case-hero-media { height: 52vh; }
  .contact-title { font-size: clamp(2.2rem, 12vw, 3rem); }
  .about-watermark { font-size: 5.4rem; top: 12px; }
  .wall-item { width: 78vw; }
  .wall-scene { width: 62vw; }
}

/* ============================ 动效降级 ================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hover-preview { display: none !important; }
  .scroll-line { animation: none; }
}
