/* ===== 全站字体：文件在 fonts/，由 tools/build-fonts.py 生成 ===== */
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-300.woff2?v=20261108h") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-700.woff2?v=20261108h") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2?v=20261108h") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/noto-sans-sc-400.woff2?v=20261108h") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2?v=20261108h") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/noto-sans-sc-500.woff2?v=20261108h") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2?v=20261108h") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/noto-sans-sc-700.woff2?v=20261108h") format("woff2"); font-weight: 700; font-display: swap; }

/* ===== 主题：改这里即可整体换色 ===== */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #8e8e93;
  --gray: #f4f4f5;
  --gray-2: #ebebed;
  --line: #ececee;
  --ph: #e6e6e9;
  --max: 1200px;
  /* 导航和主要内容共用的宽度 */
  --content: min(1392px, 78vw);
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 全站统一的缓动：快进慢出 */
  --expo: cubic-bezier(.19, 1, .22, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
.container { width: var(--content); margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ===== 图片占位 ===== */
.ph {
  position: relative; display: grid; place-content: center;
  width: 100%; height: 100%; min-height: 40px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(0,0,0,.022) 12px 24px), var(--ph);
  border-radius: inherit; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.4;
}
.ph::before { content: attr(data-label); font-weight: 600; color: #6e6e73; font-size: 13px; }
.ph::after { content: attr(data-size); }

/* 图片编号角标；图片文件存在时铺满并隐藏占位内容 */
.ph-no {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 12px; font-style: normal; font-weight: 600; line-height: 1.5;
}
.auto-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.has-img > .ph-no, .has-img > span { display: none; }
.ph.has-img::before, .ph.has-img::after { content: none; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .06em; white-space: nowrap;
  transition: background .2s, transform .3s var(--expo);
}
.btn:active { transform: scale(.96); }
.btn svg { transition: transform .4s var(--expo); }
.btn:hover svg { transform: translateX(3px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-gray { background: var(--gray); }
.btn-gray:hover { background: var(--gray-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ===== 导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { width: var(--content); margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
/* 手机菜单按钮：两条线，打开时变成叉 */
.nav-toggle { display: none; position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--gray); }
.nav-toggle i { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 1px; background: var(--ink); transition: transform .3s var(--expo), top .3s var(--expo); }
.nav-toggle i:nth-child(1) { top: 15px; }
.nav-toggle i:nth-child(2) { top: 21px; }
.nav-toggle.open i { top: 18px; }
.nav-toggle.open i:nth-child(1) { transform: rotate(45deg); }
.nav-toggle.open i:nth-child(2) { transform: rotate(-45deg); }
.lang-toggle { height: 38px; min-width: 52px; padding: 0 14px; border-radius: 999px; background: var(--gray); font-size: 14px; font-weight: 600; text-align: center; white-space: nowrap; transition: background .2s; }
.lang-toggle:hover { background: var(--gray-2); }
.logo { font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 7px clamp(8px, 1vw, 14px); white-space: nowrap; border-radius: 999px; font-size: 14px; font-weight: 500; color: #555; transition: background .2s, color .2s; }
.nav-links a:hover { background: var(--gray); color: var(--ink); }

/* ===== 首屏 ===== */
/* 首屏占满导航以下一屏；滚动时内容固定并收紧，作品库随滚动升到它下方（js/main.js 的 updateHero） */
.hero { height: calc(100vh - 64px); height: calc(100svh - 64px); }
.hero-pin { position: sticky; top: 64px; height: var(--pin-h, 100%); }
.hero-inner { padding: 0 20px; text-align: center; transform-origin: 50% 0; will-change: transform; }
.hero-title {
  --icon-w: 1.26em; --icon-h: .84em; --icon-bottom: -.1em;
  font-size: clamp(20px, min(6.9vw, 11vh), 84px); font-weight: 400; line-height: calc(1.4 - .15 * var(--t, 0)); letter-spacing: .03em;
}
/* 靠粗细形成对比：前面细，最后的落点粗 */
.hero-strong { font-weight: 700; }
.hero-line { display: block; color: #a8a8ad; animation: blurUp 1.1s var(--expo) backwards; animation-delay: calc(200ms + var(--i) * 90ms); }
.hero-line:last-child { color: var(--ink); }
.load-in { animation: blurUp 1.1s var(--expo) backwards; animation-delay: calc(200ms + var(--i) * 90ms); }
.hero-sub { margin: calc(48px - 30px * var(--t, 0)) 0 calc(52px - 28px * var(--t, 0)); font-size: clamp(15px, 1.4vw, 18px); line-height: 2; letter-spacing: .06em; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes blurUp { from { opacity: 0; transform: translateY(.4em); filter: blur(10px); } }

/* 词与词之间的小图标：先撑开空位，再弹出图标 */
.slot {
  position: relative; display: inline-block; height: 1px; vertical-align: baseline;
  width: calc(var(--icon-w) + .44em);
  animation: slotOpen .5s var(--expo) backwards; animation-delay: var(--d);
}
.slot-icon {
  position: absolute; left: 50%; bottom: var(--icon-bottom);
  width: var(--icon-w); height: var(--icon-h); border-radius: .1em; overflow: hidden;
  display: grid; place-content: center;
  background: var(--c); color: rgba(0, 0, 0, .45);
  transform: translateX(-50%);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
/* 轮播：当前图标弹入，上一个图标缩小模糊淡出 */
.slot-icon.active { opacity: 1; visibility: visible; pointer-events: auto; animation: iconPop .9s linear backwards; }
.slot-icon.out { visibility: visible; animation: iconOut .32s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes iconOut {
  from { opacity: 1; transform: translateX(-50%) scale(1); filter: blur(0); }
  to   { opacity: 0; transform: translateX(-50%) scale(.72); filter: blur(7px); }
}
.slot-icon span { font-size: .17em; font-weight: 600; letter-spacing: 0; }
.slot-icon.active:hover { transform: translateX(-50%) translateY(-.04em) scale(1.08); }
.slot-icon::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px);
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap; letter-spacing: 0;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity .2s, transform .3s var(--expo);
}
.slot-icon:hover::after { opacity: 1; transform: translate(-50%, 0); }
@keyframes slotOpen { from { width: .25em; } }
@keyframes iconPop {
  0%   { opacity: 0; transform: translateX(-50%) scale(.72); filter: blur(7px); animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  45%  { opacity: 1; transform: translateX(-50%) scale(1.02); filter: blur(0); }
  68%  { transform: translateX(-50%) scale(.995); }
  85%  { transform: translateX(-50%) scale(1.001); }
  100% { transform: translateX(-50%) scale(1); }
}

/* ===== 三张层叠作品卡 ===== */
.showcase {
  position: relative; overflow: hidden; padding-top: 48px;
  background-image: linear-gradient(#ececee 1px, transparent 1px), linear-gradient(90deg, #ececee 1px, transparent 1px);
  background-size: 80px 80px;
}
/* 底部渐隐到白色，卡片像被裁在页面里 */
.showcase::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 4; pointer-events: none;
  background: linear-gradient(to top, #fff 8%, rgba(255,255,255,0));
}
.showcase-stage { position: relative; width: var(--content); aspect-ratio: 8 / 3; margin: 0 auto; transform-origin: 50% 0; will-change: transform; }
/* 卡片宽 46%、两侧外移 60%，三张的总宽度正好等于内容宽度 */
.showcase-card {
  position: absolute; top: 0; left: 50%; width: 46%; aspect-ratio: 4 / 5; overflow: hidden;
  border: 8px solid #fff; border-radius: 28px; background: #fff;
  box-shadow: 0 20px 48px rgba(15,15,15,.14), 0 4px 12px rgba(15,15,15,.08);
  transition: transform .8s cubic-bezier(.4, 0, .2, 1), box-shadow .4s;
}
.showcase-card .ph { border-radius: 20px; }
.showcase-card.pos-center { z-index: 3; transform: translateX(-50%); }
.showcase-card.pos-left { z-index: 1; transform: translateX(-110%) translateY(24px) rotate(-3deg) scale(.92); }
.showcase-card.pos-right { z-index: 2; transform: translateX(10%) translateY(24px) rotate(3deg) scale(.92); }
.showcase-card.pos-center:hover { transform: translateX(-50%) translateY(-8px); }
.showcase-card.pos-left:hover { transform: translateX(-110%) translateY(14px) rotate(-3deg) scale(.92); }
.showcase-card.pos-right:hover { transform: translateX(10%) translateY(14px) rotate(3deg) scale(.92); }

/* ===== 通用区块 ===== */
.section { padding: 160px 0 0; }
.showcase + .section { padding-top: 96px; }
/* 所有板块标题共用：字号一致；标题到下方内容 48px，到副标题 16px */
.title { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.12; letter-spacing: -.03em; }
.title + * { margin-top: 48px; }
.title + .wild-sub { margin-top: 16px; }
.title + .cta-sub { margin-top: -24px; } /* 联系区本身有 40px 的行距，这里减到 16px */

/* ===== 服务：堆叠翻页卡片 ===== */
.stack { display: flex; flex-direction: column; gap: 24px; transform-origin: 50% 0; }
.stack-card {
  position: sticky; top: 88px;
  display: grid; grid-template-columns: 1fr 1.1fr;
  height: min(560px, calc(100vh - 112px)); height: min(560px, calc(100svh - 112px));
  border-radius: 32px; overflow: hidden; background: #f7f7f8; cursor: pointer;
  transform-origin: 50% 0; will-change: transform;
}
/* 被后一张盖住时略微变暗 */
.stack-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: var(--ink); opacity: var(--shade, 0);
}
.stack-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px; }
.stack-badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 500;
}
.stack-badge i { width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.stack-text h3 { font-size: clamp(26px, 2.8vw, 36px); font-weight: 500; line-height: 1.25; letter-spacing: .01em; }
.stack-text p { margin: 16px 0 28px; max-width: 440px; font-size: 16px; line-height: 1.8; letter-spacing: .03em; color: #77777c; }
.stack-visual {
  position: relative; overflow: hidden; background-color: #f1f1f2;
  background-image: radial-gradient(#d5d5d9 1px, transparent 1px); background-size: 28px 28px;
}
.stack-visual > * { position: absolute; overflow: hidden; background: #fff; box-shadow: 0 16px 48px rgba(0,0,0,.12); transition: translate .7s var(--expo), rotate .7s var(--expo); }

.mock-browser { left: 10%; right: -8%; top: 16%; aspect-ratio: 16 / 10.5; border-radius: 14px; padding-top: 28px; }
.mock-browser > i { position: absolute; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: #e1e1e4; }
.mock-browser > i:nth-child(1) { left: 14px; } .mock-browser > i:nth-child(2) { left: 28px; } .mock-browser > i:nth-child(3) { left: 42px; }
.mock-browser .ph { border-radius: 0; }
.stack-web:hover .mock-browser { translate: 0 -10px; }
.mock-space { left: 10%; right: -8%; top: 18%; aspect-ratio: 16 / 9; border-radius: 14px; }
.stack-space:hover .mock-space { translate: 0 -10px; }
.mock-box { top: 20%; width: 44%; aspect-ratio: 1; border-radius: 14px; }
.mock-box.b1 { left: 10%; rotate: -4deg; }
.mock-box.b2 { left: 46%; top: 34%; rotate: 5deg; }
.stack-pack:hover .b1 { translate: -12px -12px; rotate: -8deg; }
.stack-pack:hover .b2 { translate: 12px -18px; rotate: 9deg; }

/* ===== 作品 ===== */
/* 卡片默认只有图，悬停时左下角淡入标题，右下角淡入类别 */
.card-info {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  opacity: 0; translate: 0 4px; pointer-events: none;
  transition: opacity .2s, translate .24s var(--expo);
}
.flip-cell:hover .card-info { opacity: 1; translate: 0; }
.card-info h3, .card-info span {
  height: 38px; line-height: 38px; padding: 0 14px; border-radius: 999px;
  background: rgba(255,255,255,.94); box-shadow: 0 1px 2px rgba(0,0,0,.08);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.card-info h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card-info span { flex: none; color: var(--muted); }

/* ===== 工作方式 ===== */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; transform-origin: 50% 0; }
.process span { font-size: 14px; font-weight: 600; color: var(--muted); }
.process h3 { margin: 14px 0 10px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.process p { font-size: 15px; color: #66666b; }

/* ===== 山野 ===== */
/* 句号右侧的空白不参与居中，否则字号越大的一行看起来越偏左 */
.hang { margin-right: -.62em; }
.wild-sub { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.88); }
/* 翻转宫格（全部案例）：3:4 卡片，桌面上正好占满导航以下一屏，上下留白相同 */
.section.flip-section {
  --flip-gap: 10px; --flip-head: 112px;
  --flip-w: min(calc((100svh - 160px - var(--flip-head) - var(--flip-gap)) * .375), calc((var(--content) - var(--flip-gap) * 3) / 4));
  display: flex; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); padding: 48px 0;
}
#work { margin-top: 160px; }
.flip-section .container { display: flex; flex-direction: column; justify-content: center; }
/* 位移留给上升放大效果实时控制，这里只让出现动画过渡透明度和模糊 */
#caseGrid { transition: opacity 1s var(--expo), filter 1s var(--expo); }
.flip-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--flip-gap); align-self: center; transform-origin: 50% 0;
  max-width: calc(var(--flip-w) * 4 + var(--flip-gap) * 3);
}
.flip-cell { position: relative; width: var(--flip-w); aspect-ratio: 3 / 4; perspective: 1100px; cursor: pointer; }
.flip-card { position: absolute; inset: 0; transform-style: preserve-3d; }
.flip-face { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face .ph { border-radius: 0; }
.flip-section .card-info { color: var(--ink); z-index: 3; }

/* 山野：背景轮盘，铺满导航以下一屏 */
.wheel-section { position: relative; height: calc(100vh - 64px); height: calc(100svh - 64px); min-height: 520px; overflow: hidden; background: #0a0a0a; color: #fff; }
.wheel-bg { position: absolute; inset: 0; isolation: isolate; }
.wheel-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.wheel-layer.on { opacity: 1; }
.wheel-layer .ph { border-radius: 0; }
/* 标题所在区域压暗，保证文字在任何照片上都看得清 */
.wheel-section::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.42) 30%, rgba(0,0,0,0) 52%); }
.wheel-head { position: absolute; left: 0; right: 0; top: 20.7%; translate: 0 -50%; z-index: 3; pointer-events: none; }
.wheel-section .title, .wild-sub { text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.wheel { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.wheel-card {
  position: absolute; top: 0; left: 0; width: clamp(76px, 7.6vw, 150px); aspect-ratio: 3 / 4; padding: 0;
  pointer-events: auto; cursor: zoom-in; will-change: transform;
}
.wheel-card:hover { z-index: 2; }
/* 悬停只放大里面的图：卡片用 transform 定位，放大卡片本身会把位移也一起放大 */
.wheel-card .ph { border-radius: 10px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: scale .3s var(--expo); }
.wheel-card:hover .ph { scale: 1.08; }
.wheel-card .ph::before, .wheel-card .ph::after { content: none; }
.wheel-label {
  position: absolute; left: 50%; top: calc(100% + 8px); translate: -50% 4px; height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.94); color: var(--ink); font-size: 12px; font-weight: 500; line-height: 28px;
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .24s var(--expo);
}
.wheel-card:hover .wheel-label { opacity: 1; translate: -50% 0; }

/* 山野照片大图 */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; visibility: hidden; }
.lightbox.open { visibility: visible; }
.lightbox .case-arrow {
  position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
  display: grid; place-content: center; background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: 0 2px 10px rgba(0,0,0,.14); transition: scale .3s var(--expo), background .2s;
}
.lightbox .case-arrow:hover { background: #fff; scale: 1.08; }
.lightbox .case-arrow:active { scale: .92; }
.lightbox .case-arrow.prev { left: 24px; }
.lightbox .case-arrow.next { right: 24px; }
.lightbox .modal-backdrop { background: rgba(0,0,0,.78); }
.lightbox.open .modal-backdrop { opacity: 1; }
.photo-box { position: relative; border-radius: 20px; overflow: hidden; background: var(--ph); }
.photo-caption { position: absolute; left: 0; right: 0; bottom: 2vh; text-align: center; font-size: 14px; color: rgba(255,255,255,.8); white-space: pre; pointer-events: none; }
.lightbox .modal-close { position: absolute; top: 20px; right: 20px; float: none; margin: 0; z-index: 3; }

/* ===== 结尾联系 ===== */
/* 正好占满导航以下的一屏，点"联系合作"跳过来时上方不露出其他内容 */
.cta {
  min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; padding: 80px 20px; text-align: center;
}
.cta-sub { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }

.footer { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ===== 英文排版：中文用的宽字距放到英文上太松 ===== */
html[lang="en"] .btn { letter-spacing: .01em; }
/* 小图 3:2，高度等于大写字母，像嵌在句子里的图片 */
html[lang="en"] .hero-title {
  --icon-w: 1.1em; --icon-h: .73em; --icon-bottom: 0em;
  font-family: "Inter Tight", var(--sans); font-weight: 300;
  line-height: calc(1.2 - .08 * var(--t, 0)); letter-spacing: -.03em;
}
html[lang="en"] .hero-line { color: var(--ink); }
html[lang="en"] .hero-sub { letter-spacing: 0; line-height: 1.6; }
html[lang="en"] .stack-text h3 { letter-spacing: -.01em; line-height: 1.2; }
html[lang="en"] .stack-text p { letter-spacing: 0; line-height: 1.6; }

/* ===== 提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 120;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  opacity: 0; transform: translate(-50%, 12px); filter: blur(4px); pointer-events: none;
  transition: opacity .3s, transform .5s var(--expo), filter .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); filter: none; }

/* ===== 作品详情弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.32); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: absolute; left: 0; right: 0; top: 4vh; margin: 0 auto;
  width: min(1000px, calc(100% - 32px)); max-height: 92vh; overflow-y: auto;
  border-radius: 28px; background: #fff;
  opacity: 0; transform: translateY(24px) scale(.97); filter: blur(6px);
  transition: opacity .4s, transform .6s var(--expo), filter .4s;
}
.modal.open .modal-panel { opacity: 1; transform: none; filter: none; }
.modal-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px 0 0; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; background: var(--gray);
  display: grid; place-content: center; transition: background .2s, transform .3s var(--expo);
}
.modal-close:hover { background: var(--gray-2); }
.modal-close:active { transform: scale(.9); }
.modal-body { padding: 48px clamp(20px, 5vw, 56px) 56px; }
.detail-tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--gray); font-size: 13px; font-weight: 500; }
.detail-title { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 16px 0 28px; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; padding: 20px 0; border-block: 1px solid var(--line); margin-bottom: 28px; }
.detail-meta dt { font-size: 13px; color: var(--muted); }
.detail-meta dd { font-size: 15px; font-weight: 500; margin-top: 2px; }
.detail-desc { font-size: 17px; color: #555; max-width: 680px; margin-bottom: 40px; }
.detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.detail-gallery figure { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; }
.detail-gallery figure.full { grid-column: span 2; aspect-ratio: 16 / 9; }
.case-block { margin-top: 48px; }
.case-block h3 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.case-block > p { margin: 8px 0 20px; font-size: 17px; color: #555; max-width: 680px; }
body.lock { overflow: hidden; }

/* ===== 滚动出现：模糊 → 清晰 + 轻微上移 ===== */
.js [data-reveal] {
  opacity: 0; transform: translateY(24px); filter: blur(6px);
  transition: opacity 1s var(--expo) var(--d, 0s), transform 1s var(--expo) var(--d, 0s), filter 1s var(--expo) var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }

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

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  /* 栏目从导航下方展开 */
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 4px 16px 12px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(0,0,0,.08);
    opacity: 0; visibility: hidden; translate: 0 -8px; transition: opacity .2s, translate .3s var(--expo), visibility .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; translate: 0; }
  .nav-links a { padding: 13px 0; border-radius: 0; font-size: 17px; color: var(--ink); }
  .nav-links a + a { border-top: 1px solid var(--line); }
  .nav-links a:hover { background: none; }
  :root { --content: calc(100vw - 32px); }
  .showcase { background-size: 56px 56px; }
  .showcase-stage { aspect-ratio: 16 / 9; }
  .showcase-card { border-width: 4px; border-radius: 16px; }
  .showcase-card .ph { border-radius: 12px; }
  .showcase-card .ph-no { top: 5px; left: 5px; font-size: 10px; }
  .section { padding-top: 120px; }
  .stack-card { top: 72px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: min(620px, calc(100vh - 88px)); height: min(620px, calc(100svh - 88px)); border-radius: 24px; }
  .stack-copy { padding: 24px; gap: 24px; }
  .stack-text p { margin: 10px 0 18px; font-size: 15px; }
  .process { grid-template-columns: 1fr; }
  .section.flip-section { --flip-gap: 8px; --flip-w: calc((var(--content) - var(--flip-gap)) / 2); display: block; min-height: 0; padding: 48px 0 64px; }
  #work { margin-top: 120px; }
  .flip-grid { max-width: none; }
  .flip-face { border-radius: 12px; }
  .flip-section .card-info { left: 8px; right: 8px; bottom: 8px; }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-gallery figure.full { grid-column: auto; }
}
