/* ==========================================================================
   观策营销 · 官网设计系统   方向 F「高定黑白」
   所有页面只准使用本文件里已有的 token 与组件，不要新造颜色 / 字号 / 间距。
   ========================================================================== */

/* ---------- 0. 字体（自托管，不走 Google Fonts） ----------
   Archivo 可变字体，仅 latin 子集，34KB，覆盖 100–900 全部字重。
   中文不下载字体，走系统黑体 —— 中文字库动辄 7MB，任何下载方案在国内都是自杀。
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("font/archivo-latin-var.woff2") format("woff2-variations"),
       url("font/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Token ---------- */
:root {
  /* 颜色 —— 纯黑白，无彩色。括号内为在黑底上的对比度 */
  --c-ground:      #000000;   /* 页面底色 */
  --c-ink:         #FFFFFF;   /* 主文字 (21:1) */
  --c-ink-2:       #9E9E9E;   /* 次级文字 (6.2:1) */
  --c-ink-3:       #7E7E7E;   /* 三级文字 (5.2:1) —— 仅用于 ≥13px */
  --c-rule:        #242424;   /* 分隔线 */
  --c-tile:        #141414;   /* 图片位 / 卡片底 */
  --c-tile-2:      #1C1C1C;
  --c-flip-ground: #FFFFFF;   /* 反白块：白底 */
  --c-flip-ink:    #000000;   /* 反白块：黑字 */
  --c-focus:       #FFFFFF;   /* 键盘焦点圈 */

  /* 图上叠字用的遮罩 —— 保证任何照片换上来文字都可读 */
  --scrim-hero: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.10) 30%, rgba(0,0,0,.58) 62%, rgba(0,0,0,.90) 100%);
  --scrim-card: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.04) 40%, rgba(0,0,0,.78) 100%);

  /* 字体 —— 拉丁文走 Archivo / 系统无衬线，中文走系统黑体（零下载） */
  --f-sans: "Archivo", "Helvetica Neue", Helvetica, Arial,
            "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
            "Noto Sans SC", "Microsoft YaHei", sans-serif;

  /* 字号 —— clamp 自适应，手机到桌面一套值 */
  --t-display: clamp(38px, 7.6vw, 88px);
  --t-h1:      clamp(30px, 5.0vw, 56px);
  --t-h2:      clamp(23px, 3.0vw, 34px);
  --t-h3:      clamp(19px, 1.8vw, 22px);
  --t-body:    16px;
  --t-small:   14px;
  --t-micro:   12px;

  /* 字重 */
  --w-normal: 400;
  --w-medium: 500;
  --w-semi:   600;
  --w-bold:   700;
  --w-black:  800;

  /* 字距 —— 大字收紧、小字放开，是这套视觉的关键 */
  --ls-display: -.04em;
  --ls-title:   -.025em;
  --ls-body:    0;
  --ls-label:   .18em;
  --ls-eyebrow: .28em;

  /* 间距 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* 版心 */
  --shell:  1280px;
  --gutter: clamp(20px, 4vw, 48px);

  /* 其它 */
  --hit:    44px;          /* 最小点击区 */
  --ease:   cubic-bezier(.2,.6,.2,1);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--c-ink-2); }

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

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

/* ---------- 3. 版心与分隔 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.rule { border: 0; border-top: 1px solid var(--c-rule); margin: 0; }

.section       { padding-block: var(--s8); }
.section--tight{ padding-block: var(--s7); }

/* ---------- 4. 文字组件 ---------- */
.eyebrow {
  font-size: var(--t-micro);
  font-weight: var(--w-bold);
  letter-spacing: var(--ls-eyebrow);
  color: var(--c-ink-2);
  text-transform: none;
}
.label {
  font-size: var(--t-micro);
  font-weight: var(--w-semi);
  letter-spacing: var(--ls-label);
  color: var(--c-ink-2);
}
.display {
  font-size: var(--t-display);
  font-weight: var(--w-black);
  line-height: .98;
  letter-spacing: var(--ls-display);
}
.h1 { font-size: var(--t-h1); font-weight: var(--w-bold); line-height: 1.06; letter-spacing: var(--ls-title); }
.h2 { font-size: var(--t-h2); font-weight: var(--w-bold); line-height: 1.15; letter-spacing: var(--ls-title); }
.h3 { font-size: var(--t-h3); font-weight: var(--w-bold); line-height: 1.3;  letter-spacing: var(--ls-title); }

.lede    { font-size: var(--t-body); line-height: 1.8; color: var(--c-ink); max-width: 48ch; }
.muted   { color: var(--c-ink-2); }
.small   { font-size: var(--t-small); }
.measure { max-width: 54ch; }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--hit);
  padding: 0 var(--s5);
  font-size: var(--t-small);
  font-weight: var(--w-bold);
  letter-spacing: .12em;
  border: 1px solid var(--c-ink);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.btn--solid { background: var(--c-flip-ground); color: var(--c-flip-ink); }
.btn--solid:hover { background: var(--c-ink-2); color: var(--c-flip-ink); }
.btn--ghost { background: transparent; color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-flip-ground); color: var(--c-flip-ink); }

.link-underline {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: var(--hit);
  font-size: var(--t-small); font-weight: var(--w-bold);
  border-bottom: 2px solid var(--c-ink);
}
.link-underline:hover { color: var(--c-ink-2); border-bottom-color: var(--c-ink-2); }

/* ---------- 6. 页头 ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5);
  min-height: 76px;
  border-bottom: 1px solid var(--c-rule);
}
.wordmark { display: flex; align-items: baseline; gap: var(--s3); }
.wordmark__latin { font-size: 21px; font-weight: var(--w-black); letter-spacing: -.025em; }
.wordmark__cn    { font-size: 13px; font-weight: var(--w-normal); letter-spacing: .3em; color: var(--c-ink-2); }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--hit);
  font-size: 13px; font-weight: var(--w-medium); letter-spacing: .14em;
}
/* 当前页高亮。必须排除 .btn —— 否则在 contact.html 上白底按钮被刷成白字，整块看不见 */
.site-nav a[aria-current="page"]:not(.btn) { color: var(--c-ink); border-bottom: 1px solid var(--c-ink); }

/* ---------- 7. 首屏 ---------- */
.hero { position: relative; overflow: hidden; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: var(--scrim-hero); }
.hero__inner {
  position: relative;
  min-height: clamp(420px, 56vw, 620px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: var(--s7);
}
.hero__caption { position: absolute; top: var(--s5); right: var(--gutter); color: var(--c-ink); }
.hero .eyebrow { color: var(--c-ink); }

/* ---------- 8. 作品卡 ---------- */
.grid { display: grid; gap: var(--s4); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { display: flex; flex-direction: column; gap: var(--s4); }
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--c-tile);
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.03); }
.card__meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.card__meta .label { flex: none; }
.card__title { font-size: var(--t-h3); font-weight: var(--w-bold); letter-spacing: var(--ls-title); min-width: 0; }
.card__en { font-size: var(--t-micro); color: var(--c-ink-3); letter-spacing: .04em;
             min-height: 1.5em; }  /* 没有英文名的案例也占住这一行，滑动带底边才齐 */

/* ---------- 9. 索引行（纯文字列表） ---------- */
.index-row {
  display: flex; align-items: center; gap: var(--s5);
  padding-block: var(--s4);
  border-top: 1px solid var(--c-rule);
}
.index-row:last-child { border-bottom: 1px solid var(--c-rule); }
.index-row__no   { width: 34px; flex: none; font-size: var(--t-micro); color: var(--c-ink-3); letter-spacing: .12em; }
.index-row__name { flex: 1 1 auto; font-size: var(--t-h3); font-weight: var(--w-bold); letter-spacing: var(--ls-title); }
.index-row__tag  { width: 120px; flex: none; font-size: var(--t-small); color: var(--c-ink-2); }
/* 案例的英文名比中文分类长得多，单独一列：右对齐、收窄行高、最多两行 */
.index-row__en   { width: 260px; flex: none; text-align: right;
                   font-size: var(--t-micro); line-height: 1.5; color: var(--c-ink-3);
                   letter-spacing: .04em; }

/* ---------- 10. 服务条 ---------- */
.service-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.service { border-top: 2px solid var(--c-ink); padding-top: var(--s4); }
.service__title { font-size: var(--t-h3); font-weight: var(--w-bold); letter-spacing: var(--ls-title); }
.service__en { font-size: var(--t-micro); color: var(--c-ink-3); letter-spacing: .14em; margin-top: var(--s1); }
.service__items { margin-top: var(--s3); font-size: var(--t-small); color: var(--c-ink-2); line-height: 2; }

/* ---------- 11. 客户名录 ---------- */
.client-list {
  display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5);
  font-size: var(--t-small); color: var(--c-ink-2);
}

/* ---------- 12. 页脚 ---------- */
.site-foot { border-top: 1px solid var(--c-rule); padding-block: var(--s5); }
.site-foot__row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s3) var(--s5);
  font-size: var(--t-small); color: var(--c-ink-2);
}
.site-foot a:hover { color: var(--c-ink); }

/* ---------- 13. 断点 ---------- */
@media (max-width: 900px) {
  .grid--3        { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-list   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section        { padding-block: var(--s7); }
}

@media (max-width: 640px) {
  .site-head      { flex-direction: column; align-items: flex-start; gap: var(--s2); padding-block: var(--s3); }
  .site-nav       { flex-wrap: wrap; gap: var(--s4); }
  .grid--3,
  .grid--2,
  .service-list   { grid-template-columns: minmax(0, 1fr); }
  .hero__caption  { display: none; }
  /* 手机上首屏更高更窄，照片的暗部被裁掉了 —— 改为取下半部，并把遮罩压得更重 */
  .hero__media    { object-position: 50% 68%; }
  .hero__scrim    { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.28) 24%, rgba(0,0,0,.72) 54%, rgba(0,0,0,.94) 100%); }
  .index-row      { flex-wrap: wrap; gap: var(--s2) var(--s4); }
  .index-row__tag,
  .index-row__en  { width: auto; text-align: left; }
  .card__meta     { flex-direction: column; align-items: flex-start; gap: var(--s1); }
}

/* ---------- 14. 工具 ---------- */
.stack     { display: flex; flex-direction: column; }
.stack-2   { gap: var(--s2); }  .stack-3 { gap: var(--s3); }
.stack-4   { gap: var(--s4); }  .stack-5 { gap: var(--s5); }
.stack-6   { gap: var(--s6); }  .stack-7 { gap: var(--s7); }
.row       { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end     { align-items: flex-end; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 15. 交互组件 (v2) ---------- */

/* 15.1 Banner 轮播 [data-carousel] */
.carousel { position: relative; width: 100%; overflow: hidden; }
/* 用 grid 让所有 slide 叠在同一格：轨道高度 = 最高的那张，每张天然满宽。
   不要用 flex + absolute/relative 切换 —— active 变成 relative 后会成为 flex item，
   宽度塌缩成内容宽而不是 100%。 */
.carousel__track { display: grid; width: 100%; position: relative; }
.carousel__slide {
  grid-area: 1 / 1; opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease);
}
.carousel__slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.carousel__nav {
  position: absolute; bottom: var(--s5); left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; gap: var(--s3);
}
.carousel__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: none; padding: 0;
  cursor: pointer; transition: background .3s var(--ease);
}
.carousel__dot.is-active { background: var(--c-ink); }
.carousel__dot:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: transparent; color: var(--c-ink); border: none;
  width: var(--hit); height: var(--hit); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color .3s var(--ease); font-size: 24px;
}
.carousel__btn:hover { color: var(--c-ink-2); }
.carousel__btn--prev { left: var(--s4); }
.carousel__btn--next { right: var(--s4); }

/* 15.2 横向滑动卡片带 [data-rail] */
.rail-wrapper { position: relative; }
.rail-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--s4); }
.rail-nav { display: flex; gap: var(--s2); }
.rail-nav button {
  width: var(--hit); height: var(--hit);
  background: transparent; border: 1px solid var(--c-rule); color: var(--c-ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease); font-size: 18px;
}
.rail-nav button:hover:not(:disabled) { background: var(--c-rule); }
.rail-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.rail {
  display: flex; gap: var(--s4); overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: var(--s2);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * {
  flex: none; scroll-snap-align: start;
  width: clamp(300px, 26vw, 380px);
}
@media (max-width: 640px) {
  .rail > * { width: 78vw; }
  .rail-nav { display: none; }
}

/* 15.3 弹窗画廊 [data-lightbox] */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.94);
  display: none; flex-direction: column;
}
.lightbox.is-open { display: flex; }
.lightbox__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s4) var(--s5); flex: none;
}
.lightbox__info { display: flex; flex-direction: column; gap: var(--s1); }
.lightbox__title { font-size: var(--t-h3); font-weight: var(--w-bold); color: var(--c-ink); }
.lightbox__en { font-size: var(--t-micro); color: var(--c-ink-3); }
.lightbox__close {
  width: var(--hit); height: var(--hit); background: transparent; border: none;
  color: var(--c-ink); font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__body {
  flex: 1 1 auto; position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lightbox__img { max-width: 90vw; max-height: 80vh; object-fit: contain; }
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: var(--hit); height: var(--hit); background: transparent; border: none;
  color: var(--c-ink); font-size: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .3s var(--ease);
}
.lightbox__btn:hover { color: var(--c-ink-2); }
.lightbox__btn--prev { left: var(--s4); }
.lightbox__btn--next { right: var(--s4); }
.lightbox__count {
  position: absolute; bottom: var(--s4); left: 50%; transform: translateX(-50%);
  font-size: var(--t-small); color: var(--c-ink-2); letter-spacing: .1em;
}

/* 15.4 堆叠卡片 [data-stack] */
.stack-wrap { position: relative; padding-bottom: var(--s8); }
.stack__item { position: sticky; }
.stack__item:nth-child(1) { top: 84px; }
.stack__item:nth-child(2) { top: 160px; }
.stack__item:nth-child(3) { top: 236px; }
.stack__item:nth-child(4) { top: 312px; }
.stack__card {
  position: relative; overflow: hidden;
  height: min(64vh, 560px); min-height: 420px;
  background: var(--c-tile); border: 1px solid var(--c-rule);
  display: flex; flex-direction: column;
  transform-origin: 50% 0%;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  color: inherit; text-decoration: none;
}
.stack__item.is-covered .stack__card { transform: scale(.972); }
.stack__tab {
  position: relative; z-index: 3; flex: none;
  height: 76px; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--s5);
  padding-inline: var(--s6);
  background: var(--c-ground);
  border-bottom: 1px solid var(--c-rule);
}
.stack__tab-no { color: var(--c-ink-3); }
.stack__tab-name { font-size: var(--t-h3); font-weight: var(--w-bold); letter-spacing: var(--ls-title); color: var(--c-ink); }
.stack__tab-en { margin-left: auto; }
.stack__figure { position: relative; flex: 1 1 auto; overflow: hidden; }
.stack__figure img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  transition: filter .45s var(--ease);
}
.stack__item.is-covered .stack__figure img { filter: brightness(.5); }
.stack__figure::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.10) 30%, rgba(0,0,0,.88) 100%);
}
.stack__body {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: var(--s6);
  display: flex; flex-direction: column; gap: var(--s4); align-items: flex-start;
}
.stack__body p { color: var(--c-ink); }
.stack__body .btn { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .stack__item { position: static; }
  .stack__card { transform: none !important; }
  .stack__figure img { filter: none !important; }
}
@media (max-width: 640px) {
  .stack__item:nth-child(1) { top: 64px; }
  .stack__item:nth-child(2) { top: 128px; }
  .stack__item:nth-child(3) { top: 192px; }
  .stack__item:nth-child(4) { top: 256px; }
  .stack__tab { height: 64px; padding-inline: var(--s4); gap: var(--s3); }
  .stack__tab-en { display: none; }
  .stack__card { height: min(62vh, 480px); min-height: 360px; }
  .stack__body { padding: var(--s5); }
}

/* Fallback for noscript */
noscript .stack__item { position: static; }
noscript .stack__card { transform: none !important; }
noscript .carousel__slide { position: relative; opacity: 1; pointer-events: auto; margin-bottom: var(--s4); }
noscript .carousel__nav, noscript .carousel__btn { display: none; }
noscript .rail { flex-wrap: wrap; }
noscript .lightbox { display: none !important; }

/* ---------- 16. 交互升级 (v3) ---------- */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 240ms;
  --dur-base: 520ms;
  --dur-slow: 760ms;
}

/* 1. 堆叠卡片置顶 */
button.stack__tab {
  width: 100%;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid var(--c-rule);
}
button.stack__tab:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -2px;
}
.stack__item:nth-child(1) { --offset-top: 0px; }
.stack__item:nth-child(2) { --offset-top: -76px; }
.stack__item:nth-child(3) { --offset-top: -152px; }
.stack__item:nth-child(4) { --offset-top: -228px; }

@media (max-width: 640px) {
  .stack__item:nth-child(1) { --offset-top: 0px; }
  .stack__item:nth-child(2) { --offset-top: -64px; }
  .stack__item:nth-child(3) { --offset-top: -128px; }
  .stack__item:nth-child(4) { --offset-top: -192px; }
}

.stack__card {
  transition: transform var(--dur-base) var(--ease-out-expo), box-shadow var(--dur-base) var(--ease-out-expo);
}
.stack-wrap[data-front] .stack__item.is-front {
  z-index: 10;
}
.stack-wrap[data-front] .stack__item.is-front .stack__card {
  transform: translateY(var(--offset-top));
}
.stack-wrap[data-front] .stack__item.is-front .stack__figure img {
  filter: none;
}
.stack-wrap[data-front] .stack__item:not(.is-front) .stack__figure {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out-expo);
}
.stack__figure {
  transition: opacity var(--dur-base) var(--ease-out-expo);
}

/* 2 & 4. 案例滑动带无限循环 + 视觉升级 */
.rail-wrapper {
  position: relative;
}
.rail-viewport {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  border-top: 1px solid var(--c-rule);
  border-bottom: 1px solid var(--c-rule);
  padding-block: var(--s2);
}
.rail {
  display: flex;
  width: max-content;
  overflow: visible;
  scroll-snap-type: none;
  gap: 0;
  padding-bottom: 0;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.rail img {
  -webkit-user-drag: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * {
  border-right: 1px solid var(--c-rule);
  padding-right: var(--s4);
  margin-right: var(--s4);
}
/* Staggering in card */
.card {
  position: relative;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
}
.card__media img {
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 620ms var(--ease-out-expo), filter var(--dur-base) var(--ease-out-expo);
}
.card__meta {
  transition: opacity var(--dur-base) var(--ease-out-expo) 40ms, transform var(--dur-base) var(--ease-out-expo) 40ms;
}
.card__en {
  transition: opacity var(--dur-base) var(--ease-out-expo) 80ms, transform var(--dur-base) var(--ease-out-expo) 80ms;
}
.rail:hover .card__media img {
  filter: brightness(0.7);
}
.rail:hover .card:hover .card__media img {
  filter: brightness(1.06);
  transform: scale(1.02);
}

/* Frame numbers */
.card::before {
  content: attr(data-frame);
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  z-index: 2;
  font-size: var(--t-micro);
  letter-spacing: var(--ls-label);
  color: var(--c-ink-3);
  mix-blend-mode: difference;
  pointer-events: none;
}

/* 质感向苹果官网看齐: overrides */
.carousel__slide {
  transition: opacity var(--dur-slow) var(--ease-in-out);
}
.lightbox__btn {
  transition: color var(--dur-fast) var(--ease-out-expo);
}
.btn {
  transition: background var(--dur-fast) var(--ease-out-expo), color var(--dur-fast) var(--ease-out-expo);
}
a {
  transition: color var(--dur-fast) var(--ease-out-expo);
}
noscript .rail {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
}

/* A4: 新增 .plate 暗色图片处理 */
.plate {
  background: #141414;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 2px;
  overflow: hidden;
}
.plate > img, .plate > video { display: block; width: 100%; height: 100%; object-fit: cover; }
a:hover > .plate, .rail__item:hover .plate, .card:hover .plate { border-color: rgba(255,255,255,.22); }
.ring__face[data-d="0"] .plate {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 80px rgba(255,255,255,.055);
}

/* A1/A2 Ring Lightbox */
.lightbox__body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ring {
  position: relative;
  width: min(72vw, 980px);
  aspect-ratio: 3 / 2;
  perspective: 1600px;
  transform-style: preserve-3d;
}
.ring__face {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform .62s var(--ease-out-expo), opacity .62s var(--ease-out-expo), filter .62s var(--ease-out-expo);
  cursor: pointer;
}
.ring__face[data-d="0"] { cursor: default; z-index: 100; transform: translate3d(0, 0, 0) rotateY(0deg); opacity: 1; filter: blur(0px); }
.ring__face[data-d="1"] { z-index: 99; transform: translate3d(320px, 0, -160px) rotateY(-38deg); opacity: 0.55; filter: blur(1.5px); }
.ring__face[data-d="-1"] { z-index: 99; transform: translate3d(-320px, 0, -160px) rotateY(38deg); opacity: 0.55; filter: blur(1.5px); }
.ring__face[data-d="2"] { z-index: 98; transform: translate3d(410px, 0, -280px) rotateY(-38deg); opacity: 0.25; filter: blur(3px); }
.ring__face[data-d="-2"] { z-index: 98; transform: translate3d(-410px, 0, -280px) rotateY(38deg); opacity: 0.25; filter: blur(3px); }
.ring__face[data-d^="3"], .ring__face[data-d^="4"], .ring__face[data-d^="5"], .ring__face[data-d^="6"], .ring__face[data-d^="7"], .ring__face[data-d^="8"], .ring__face[data-d^="9"], .ring__face[data-d="10"], .ring__face[data-d="11"], .ring__face[data-d="12"] { z-index: 10; transform: translate3d(480px, 0, -380px) rotateY(-38deg); opacity: 0; filter: blur(3px); pointer-events: none; }
.ring__face[data-d^="-3"], .ring__face[data-d^="-4"], .ring__face[data-d^="-5"], .ring__face[data-d^="-6"], .ring__face[data-d^="-7"], .ring__face[data-d^="-8"], .ring__face[data-d^="-9"], .ring__face[data-d="-10"], .ring__face[data-d="-11"], .ring__face[data-d="-12"] { z-index: 10; transform: translate3d(-480px, 0, -380px) rotateY(38deg); opacity: 0; filter: blur(3px); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .ring__face { transform: none !important; filter: none !important; }
  .ring__face:not([data-d="0"]) { opacity: 0 !important; pointer-events: none; }
}

.ring__dur {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: var(--t-micro);
  pointer-events: none;
  z-index: 2;
}
.ring__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.ring__play::after {
  content: '';
  display: block;
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 6px;
}

/* A4 specific layout fixes for plate wrapper */
.plate {
  width: 100%;
  height: 100%;
}
.stack__figure .plate, .card__media .plate {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* Revert the absolute positioning from original img, as plate now handles it */
.stack__figure img, .card__media img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
}
/* Move the z-index to plate so the ::after gradient still covers it */
.stack__figure .plate { z-index: 0; }

/* ---------- B批新增 ---------- */
.card__tags {
  font-size: var(--t-micro);
  color: var(--c-ink-3);
  letter-spacing: .04em;
  min-height: 1.5em;
}

.filter-btn[aria-pressed="true"] {
  background: var(--c-ink);
  color: var(--c-ground);
}
.stack-1 { gap: var(--s1); }
.card__tags:empty { display: none; }

/* ---------- 18. 数据加载失败提示 ---------- */
/* 静默失败会被误读成"点击没生效"，所以失败必须看得见 */
.data-error{
  position: fixed; left: 50%; bottom: var(--s4); transform: translate(-50%, 16px);
  max-width: min(92vw, 560px); padding: var(--s3) var(--s4);
  background: var(--c-tile); color: var(--c-ink);
  border: 1px solid rgba(255,255,255,.22); border-radius: 2px;
  font-size: var(--t-small); line-height: 1.5; text-align: center;
  opacity: 0; pointer-events: none; z-index: 9999;
  transition: opacity var(--dur-base) var(--ease-out-expo),
              transform var(--dur-base) var(--ease-out-expo);
}
.data-error.is-on{ opacity: 1; transform: translate(-50%, 0); }

/* ---------- 19. 首页 banner ---------- */
/* 文字压在画面上（原方案）。槽位定 16:9：第一张主视觉稿正好满幅不裁，
   另外两张的裁切量也小于原来的 2.06 槽位。底部加重 scrim 保证标题可读。 */
.hero{ background: var(--c-ground); }
.hero .carousel__track{ aspect-ratio: 16 / 9; max-height: 78vh; }
.hero__media{ position: absolute; inset: 0; width: 100%; height: 100%;
              object-fit: cover; object-position: 50% 42%; }
.hero__inner{ position: relative; height: 100%;
              display: flex; flex-direction: column; justify-content: flex-end;
              padding-block: var(--s7); }
.hero__caption{ position: absolute; top: var(--s5); left: var(--gutter);
                width: fit-content; max-width: calc(100% - var(--gutter) * 2);
                color: var(--c-ink-2); }
@media (max-width: 760px){
  .hero .carousel__track{ aspect-ratio: 4 / 3; max-height: 66vh; }
  .hero__caption{ font-size: var(--t-micro); }
}

/* ---------- 20. 设计类案例不裁切 ---------- */
/* 创意设计 / 物料制作 的画面是作品本身（画册跨页、主视觉、手册内页），
   比例从 1:1 到 3:1 都有。裁进 3:2 的面里会切掉版心与留白，
   「设计美感」恰恰住在那些被切掉的地方。所以这两类用 contain 完整展示。 */
.ring--art .plate{ background: var(--c-ground); border-color: rgba(255,255,255,.14); }
.ring--art .plate > img{ object-fit: contain; }
