/* ============================================================
   Portfolio — Design System
   極簡・國際感・讓作品成為畫面唯一的顏色
   ============================================================ */

:root {
  /* palette — black / white / grey */
  --paper:      #FFFFFF;
  --paper-2:    #F0F0F0;
  --ink:        #1C1C1C;
  --ink-soft:   #6F6F6F;
  --ink-faint:  #A6A6A6;
  --line:       rgba(0, 0, 0, 0.13);
  --line-soft:  rgba(0, 0, 0, 0.06);
  --accent:     #1C1C1C;      /* chrome stays neutral on purpose */
  --canvas:     #ECECEC;      /* full-bleed feature canvas (site) */
  --canvas-2:   #F4F4F4;      /* full-bleed feature canvas (doc) */
  --card-mat:   #EAEAEA;      /* grey mat behind home project thumbnails */

  /* type — Geist (grotesque) + Geist Mono, CJK falls back to a clean sans */
  --sans: "Geist", "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --cjk:  "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Geist", "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Songti TC", "Times New Roman", serif;

  /* metrics */
  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1500px;
}

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

/* ---------- custom cursor ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 9999;
  transition: width .3s cubic-bezier(.19,1,.22,1), height .3s cubic-bezier(.19,1,.22,1), opacity .3s ease;
  will-change: transform;
}
.cursor-dot.is-hover { width: 28px; height: 28px; }
.cursor-dot.is-down  { width: 20px; height: 20px; }
.cursor-dot.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- shared bits ---------- */

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.zh { font-family: var(--cjk); }

/* ---------- top bar ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  mix-blend-mode: normal;
}
.nav__brand { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; display: flex; gap: 10px; align-items: baseline; }
.nav__brand b { font-weight: 600; }
.nav__brand .dot { color: var(--ink-faint); }
.nav__links { display: flex; gap: clamp(16px, 3vw, 34px); }
.nav__links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); position: relative; padding-bottom: 2px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--ink); transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }

/* ---------- hero ---------- */

.hero { padding: clamp(70px, 15vh, 190px) 0 clamp(48px, 8vh, 96px); }
.hero__kicker { margin-bottom: 30px; }
.hero__title {
  font-size: clamp(34px, 6.4vw, 92px);
  line-height: 1.02; letter-spacing: -0.03em; font-weight: 600;
  max-width: 15ch;
}
.hero__title .soft { color: var(--ink-faint); }
.hero__sub {
  margin-top: 28px; max-width: 46ch;
  font-family: var(--cjk); font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-soft); line-height: 1.75; letter-spacing: 0;
}

/* code-ish flourish, echoing the reference site */
.codeblock {
  font-family: var(--mono); font-size: clamp(11px, 1.15vw, 13px);
  color: var(--ink-soft); line-height: 1.9; margin-top: 40px;
  white-space: pre; overflow-x: auto;
}
.codeblock .fn { color: var(--ink); }

/* ---------- hero CTA buttons ---------- */
.herocta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(30px,5vh,46px); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  padding: 15px 24px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
}
.btn__ico { flex: 0 0 auto; }
/* 純圖示按鈕：正圓形 */
.btn--icon { width: 50px; height: 50px; padding: 0; justify-content: center; }
.btn--icon .btn__ico { width: 19px; height: 19px; }
.btn__arrow { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { opacity: .85; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn--linkedin:hover { border-color: #0A66C2; background: #0A66C2; color: #fff; }  /* 只有 LinkedIn 用品牌藍 */
#work { scroll-margin-top: 84px; }

/* ---------- filter ---------- */

.filterbar {
  display: flex; flex-wrap: wrap; gap: 8px 8px; align-items: center;
  padding: 22px 0; border-top: 1px solid var(--line);
  position: sticky; top: 61px; background: var(--paper); z-index: 20;
}
.filterbar .lbl { margin-right: 12px; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-soft); padding: 7px 13px; border: 1px solid var(--line);
  border-radius: 100px; cursor: pointer; background: transparent;
  transition: all .25s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .count { opacity: .5; margin-left: 5px; }

/* ---------- project grid ---------- */

.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); align-items: start;
  gap: clamp(28px, 4vw, 60px) clamp(20px, 3vw, 48px);
  padding: 40px 0 clamp(80px, 14vh, 160px);
}
.card { display: block; cursor: pointer; }
.card__media {
  position: relative; background: var(--card-mat);
  border: 1px solid var(--line); aspect-ratio: 3 / 2; overflow: hidden;
  padding: clamp(16px, 2vw, 30px);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s ease;
}
.card:hover .card__media { background: #E2E2E2; }
.card__thumb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.card__thumb img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; display: block;  /* uniform card · full image · never cropped */
  border-radius: 3px;
  box-shadow: 0 12px 28px -12px rgba(0,0,0,.34), 0 3px 8px -4px rgba(0,0,0,.16);
  transform: scale(1.002);
  transition: transform .9s cubic-bezier(.19,1,.22,1);
}
.card:hover .card__thumb img { transform: scale(1.03); }
.card__idx {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: #fff; mix-blend-mode: difference;
}
.card__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 16px 2px 0;
}
.card__title { font-family: var(--cjk); font-size: clamp(16px, 1.7vw, 21px); font-weight: 600; letter-spacing: 0; }
.card__title small { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; margin-top: 5px; }
.card__meta { text-align: right; flex-shrink: 0; }
.card__tags { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.card__year { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }

/* ---------- reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.19,1,.22,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- project detail ---------- */

.detail { padding-top: clamp(40px, 8vh, 90px); }
.back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 46px; }
.detail__head { border-top: 1px solid var(--ink); padding-top: 26px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.detail__title { font-size: clamp(30px, 5vw, 66px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; font-family: var(--cjk); }
.swatches { display: flex; gap: 9px; flex-shrink: 0; padding-top: 10px; }
.swatches span { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.detail__title small { display:block; font-family: var(--mono); font-weight: 400; font-size: clamp(12px,1.3vw,15px); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-top: 14px; }

.metagrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin: 46px 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.metagrid dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px; }
.metagrid dd { font-family: var(--cjk); font-size: 15px; }

.lede { font-family: var(--cjk); font-size: clamp(18px, 2.3vw, 27px); line-height: 1.6; letter-spacing: -0.01em; max-width: 30ch; margin: clamp(30px,6vh,70px) 0; }

.section { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.section__k { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.section__k em { display:block; font-style: normal; color: var(--ink-faint); margin-top: 4px; }
.section__body { font-family: var(--cjk); font-size: clamp(15px,1.5vw,17px); line-height: 1.85; color: #2b2a24; max-width: 60ch; }

.figs { padding: clamp(30px,6vh,60px) 0; display: flex; flex-direction: column; gap: clamp(8px,1.2vw,14px); }
.fig { background: var(--paper-2); border: 1px solid var(--line-soft); overflow: hidden; }
.fig img { width: 100%; display: block; }
/* Instagram-style post card for IG triptychs */
.ig-post { border: 1px solid var(--line-soft); background: var(--paper); border-radius: 8px; overflow: hidden; cursor: default; width: 100%; }
.ig-post__head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.ig-post__avatar { width: 30px; height: 30px; border-radius: 50%; background: #A8AE7C; color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif, "Instrument Serif", serif); font-style: italic; font-size: 17px; line-height: 1; flex: 0 0 auto; overflow: hidden; }
.ig-post__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-post__user { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; line-height: 1.25; }
.ig-post__user small { font-family: var(--cjk); font-weight: 400; font-size: 10.5px; color: var(--ink-soft); }
.ig-post__more { margin-left: auto; color: var(--ink-soft); letter-spacing: 1px; }
.ig-tri { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; background: var(--paper); }
.ig-tri img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 5; }
.ig-post__bar { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 14px; color: var(--ink); }
.ig-post__acts { display: inline-flex; gap: 14px; }
.ig-post__save { margin-left: auto; }
/* 跨頁系列：橫式跨頁橫向捲動 */
.strip { position: relative; margin: 0; }
.strip__track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 4px; }
.strip__track::-webkit-scrollbar { display: none; }
.strip__item { position: relative; flex: 0 0 100%; scroll-snap-align: start; line-height: 0; }
.strip__item img { width: 100%; display: block; }
.strip__n { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 100px; background: rgba(0,0,0,.5); color: #fff; font-size: 10px; letter-spacing: .04em; }
.strip__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #222; font-size: 19px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s, background .2s; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.strip--many:hover .strip__arrow { opacity: 1; }
.strip__arrow:hover { background: #fff; }
.strip__arrow--prev { left: 14px; } .strip__arrow--next { right: 14px; }
.strip.at-start .strip__arrow--prev, .strip.at-end .strip__arrow--next { opacity: 0 !important; pointer-events: none; }
.strip__hint { margin-left: 10px; color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; }

/* IG 多連圖：整組在貼文卡內輪播 */
.ig-post--single { margin: 0; }
.ig-post__media { position: relative; line-height: 0; }
.igcar { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.igcar::-webkit-scrollbar { display: none; }
.igcar__item { flex: 0 0 100%; scroll-snap-align: start; }
.igcar__item img { width: 100%; height: auto; display: block; }

/* 手機：demo 手機內部不吃觸控捲動，避免手指卡在 demo 裡滑不動整頁 */
@media (max-width: 860px) {
  /* 自動播放的手機改為純展示，整頁才滑得動 */
  .phone--auto .phone__screen { overflow: hidden; }
  /* 可手動滑的商品頁：滑到底把捲動交還給頁面，不會把手指卡住 */
  .phone--scrollable .phone__screen { overscroll-behavior: auto; }
  .phone--auto .phone__hint { display: none; }
  /* EDM 手機保留可讀，但滑到底就把捲動交還給頁面 */
  .phone--edm .phone__screen { overscroll-behavior: auto; }
}

/* 專案負責範疇（平面設計 / 行銷企劃…） */
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); margin-top: clamp(28px, 4vw, 44px); max-width: 720px; }
.scope__k { display: flex; align-items: baseline; gap: 10px; font-size: 11px; letter-spacing: .12em; color: var(--ink); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.scope__k em { font-family: var(--cjk); font-style: normal; font-size: 12px; letter-spacing: .02em; color: var(--ink-soft); text-transform: none; }
.scope ul { list-style: none; padding: 0; margin: 0; }
.scope li { font-size: 13px; line-height: 2; color: var(--ink-soft); }
@media (max-width: 620px) { .scope { grid-template-columns: 1fr; } }

/* 社群經營成效：數據動畫 + 成長趨勢圖 */
.feature--stats .stats { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 46px); }
.stats__headline { font-size: clamp(19px, 2.4vw, 30px); font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; max-width: 22em; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 30px); }
.statcard { border-top: 1px solid var(--ink); padding-top: 16px; }
.statcard__num { font-family: var(--mono); font-size: clamp(30px, 4.6vw, 58px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: #4A5D4E; font-variant-numeric: tabular-nums; }
.statcard { border-top-color: #4A5D4E; }
.statcard__label { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.statcard__note { margin-top: 5px; font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); }
.statchart { margin: 0; }
.statchart__cap { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-soft); letter-spacing: .06em; margin-bottom: 12px; }
.statchart svg { width: 100%; height: clamp(180px, 24vw, 280px); display: block; overflow: visible; }
/* 折線由底部往上長，配合描線形成爬升感 */
.statchart__grow { transform-box: fill-box; transform-origin: bottom center; transform: scaleY(.06); }
.is-drawn .statchart__grow { transform: scaleY(1); transition: transform 1.6s cubic-bezier(.16,.84,.3,1); }
.statchart__area { fill: color-mix(in srgb, var(--accent, #5A3A22) 12%, transparent); opacity: 0; transition: opacity .8s ease .5s; }
.statchart__line { fill: none; stroke: var(--accent, #5A3A22); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 6000; stroke-dashoffset: 6000; }   /* 需大於折線長度，否則末段畫不出來 */
/* 圓點改用 HTML 疊層：SVG 用 preserveAspectRatio="none" 拉伸座標系，畫在裡面的 circle 會被壓成橢圓 */
.statchart__plot { position: relative; }
.statchart__dots { position: absolute; inset: 0; pointer-events: none; }
.statchart__dots span { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; box-sizing: border-box;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--accent, #5A3A22); opacity: 0; }
.is-drawn .statchart__line { transition: stroke-dashoffset 1.8s cubic-bezier(.33,.9,.35,1); stroke-dashoffset: 0; }
.is-drawn .statchart__area { opacity: 1; }
/* 折線爬完(1.6s)之後圓點才依序出現 */
.is-drawn .statchart__dots span { animation: dotIn .4s ease forwards; animation-delay: calc(.8s + var(--i) * .11s); }
@keyframes dotIn { to { opacity: 1 } }
.statchart__axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 9.5px; color: #b0b0b0; letter-spacing: .04em; }
@media (max-width: 620px) { .statchart__axis span:nth-child(even) { visibility: hidden; } }
.stats__posts { border-top: 1px solid var(--line-soft); padding-top: 22px; }
.stats__posts .figs.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 34px); }
@media (max-width: 760px) { .stats__posts .figs.duo { grid-template-columns: 1fr; } }
.stats__work { border-top: 1px solid var(--line-soft); padding-top: 22px; }
.stats__worktitle { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.stats__work ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px clamp(24px, 4vw, 60px); list-style: none; padding: 0; margin: 0; }
.stats__work li { position: relative; padding-left: 16px; font-size: 12.5px; line-height: 1.75; color: var(--ink-soft); }
.stats__work li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent, #5A3A22); }
@media (max-width: 860px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } .stats__work ul { grid-template-columns: 1fr; } }

/* IG 個人檔案首頁：每張圖各自一篇貼文 */
.igprofile { margin: 0; border: 1px solid var(--line-soft); background: var(--paper); border-radius: 8px; overflow: hidden; width: 100%; }
.igprofile__head { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); padding: 20px clamp(16px, 3vw, 28px) 14px; }
.igprofile__avatar { width: clamp(64px, 9vw, 88px); height: clamp(64px, 9vw, 88px); border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #eee; }
.igprofile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.igprofile__user { font-size: 14px; font-weight: 600; color: var(--ink); }
.igprofile__stats { display: flex; gap: 18px; margin-top: 10px; font-size: 11.5px; color: var(--ink-soft); }
.igprofile__stats b { color: var(--ink); font-weight: 600; }
.igprofile__bio { margin-top: 9px; font-family: var(--cjk); font-size: 12px; line-height: 1.7; color: var(--ink-soft); display: flex; flex-direction: column; }
.igprofile__bio span:last-child { color: #3b6ea5; }
.igprofile__tabs { display: flex; justify-content: center; gap: 42px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: #aaa; }
.igprofile__tabs .on { color: var(--ink); border-top: 1px solid var(--ink); margin-top: -11px; padding-top: 10px; }
.igprofile__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-height: min(1500px, 145vh); overflow-y: auto; scrollbar-width: thin; }
.igprofile__cell { line-height: 0; }
.igprofile__cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.ig-post__count { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 100px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; letter-spacing: .04em; z-index: 2; }
.igcar__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #333; font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s; box-shadow: 0 2px 10px rgba(0,0,0,.15); z-index: 2; }
.ig-post--single:hover .igcar__arrow { opacity: 1; }
.igcar__arrow--prev { left: 10px; } .igcar__arrow--next { right: 10px; }

/* Shopify 風格官網首頁輪播 */
.feature--shop .feature__media { padding: 0 clamp(16px,4vw,40px); }
.shop { width: min(1080px, 100%); margin: 0 auto; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 48px rgba(0,0,0,.13); }
.shop__bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #f3f3f3; border-bottom: 1px solid #e6e6e6; }
.shop__dots { display: inline-flex; gap: 6px; }
.shop__dots i { width: 10px; height: 10px; border-radius: 50%; background: #d6d6d6; }
.shop__dots i:first-child { background: #ff5f57; } .shop__dots i:nth-child(2) { background: #febc2e; } .shop__dots i:nth-child(3) { background: #28c840; }
.shop__url { flex: 1; text-align: center; font-size: 11px; color: #999; background: #fff; border-radius: 100px; padding: 4px 12px; }
.shop__nav { display: flex; align-items: center; gap: 22px; padding: 14px 24px; border-bottom: 1px solid #eee; }
.shop__logo { font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: #4A3524; display: inline-flex; align-items: center; }
.shop__logo img { height: 22px; width: auto; display: block; }
.shop__links { display: flex; gap: 18px; margin-left: auto; }
.shop__links b { font-weight: 400; font-size: 11px; color: #666; }
.shop__icons { display: inline-flex; gap: 12px; color: #555; }
.shop__hero { position: relative; aspect-ratio: 16 / 9; background: #faf7f4; }
.shop__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.shop__slide.on { opacity: 1; }
.shop__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #333; font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .25s, background .2s; }
.shop:hover .shop__arrow { opacity: 1; }
.shop__arrow:hover { background: #fff; }
.shop__arrow--prev { left: 14px; } .shop__arrow--next { right: 14px; }
.shop__foot { display: flex; align-items: center; gap: 16px; padding: 13px 24px; border-top: 1px solid #eee; }
.shop__label { font-size: 11px; color: #777; }
.shop__dotsnav { display: inline-flex; gap: 7px; margin-left: auto; }
.shop__dotsnav i { width: 7px; height: 7px; border-radius: 50%; background: #dcdcdc; cursor: pointer; transition: background .2s; }
.shop__dotsnav i.on { background: #4A3524; }
.ig-dots { position: absolute; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 5px; }
.ig-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.18); }
.ig-dots i.on { background: var(--accent, #A8AE7C); }

/* videos: true edge-to-edge full-bleed, autoplay, no frame/caption */
.fig--video {
  background: transparent; border: 0; cursor: default;
  width: 100vw; margin-left: calc(-50vw + 50%);
  border-radius: 0; overflow: hidden;
}
.fig--video video { width: 100%; height: auto; display: block; background: #0d0d0d; }
.fig figcaption { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); padding: 12px 14px; background: var(--paper); border-top: 1px solid var(--line-soft); }
/* two equal-width columns; same-aspect pairs render equal-height with no gaps.
   padding:0 overrides the outer .figs vertical padding (this row also matches .figs) */
.figs.duo { display: grid; grid-template-columns: 1fr 1fr; align-items: start; padding: 0; }
.figs.duo .fig { min-width: 0; }
.figs.duo .fig img { width: 100%; height: auto; display: block; }

/* ---------- clickable featured figure ---------- */
.fig { cursor: pointer; }
.fig img { transition: opacity .3s ease; }
.fig:hover img { opacity: .93; }

/* ---------- featured showcase (full-bleed, editorial, natural scroll) ---------- */
.feature {
  position: relative; width: 100vw; margin-left: calc(50% - 50vw);
  background: var(--canvas); padding: clamp(48px,9vh,110px) 0;
  margin-top: clamp(30px,6vh,70px); margin-bottom: clamp(30px,6vh,70px);
}
.feature--doc { background: var(--canvas-2); }
.feature__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(30px,5vh,58px);
}
.feature__kick { margin-bottom: 16px; }
.feature__title { font-size: clamp(26px,4.2vw,56px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; }
.feature__meta { margin-top: 14px; color: var(--ink-soft); text-transform: none; letter-spacing: .02em; }
.feature__full {
  flex-shrink: 0; background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
  font-size: 11px; letter-spacing: .05em; padding: 12px 18px; border-radius: 7px; transition: opacity .2s;
}
.feature__full:hover { opacity: .82; }
.feature__media { display: flex; flex-direction: column; align-items: center; padding: 0 var(--pad); }
.feature__frame {
  width: min(1080px, 100%); background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(22,21,15,.32), 0 6px 20px -8px rgba(22,21,15,.16);
}
.feature__bar {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: #f4f2ee; border-bottom: 1px solid rgba(0,0,0,.06);
}
.feature__bar .show__dots { display: inline-flex; gap: 7px; }
.feature__bar .show__dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.13); }
.feature__bar .show__url {
  flex: 1; text-align: center; color: var(--ink-soft); text-transform: none; letter-spacing: .02em;
  background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 7px; padding: 7px 12px; max-width: 460px; margin: 0 auto;
}
.feature__strip img { width: 100%; display: block; }
.feature--doc .feature__strip img { border-bottom: 1px solid rgba(0,0,0,.12); }
.feature--doc .feature__strip img:last-child { border-bottom: 0; }

/* phone mockup for one-page (mobile) sites — fixed size, mouse-scrollable */
.phone {
  position: relative; width: 372px; height: 764px; flex-shrink: 0;
  background: #111; border-radius: 52px; padding: 13px;
  box-shadow: 0 50px 100px -30px rgba(0,0,0,.45), 0 8px 24px -8px rgba(0,0,0,.28),
              inset 0 0 0 2px rgba(255,255,255,.06);
}
.phone__island {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 28px; background: #000; border-radius: 100px; z-index: 3; pointer-events: none;
}
.phone__screen {
  width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden;
  border-radius: 40px; background: #fff; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; cursor: grab; scrollbar-width: none;
}
.phone__screen.dragging { cursor: grabbing; }
/* iOS-style status bar (pushes the page down so the island doesn't cover it) */
.phone__status {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px 0 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.6) 55%, rgba(255,255,255,0) 100%);
  backdrop-filter: blur(16px) saturate(1.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.7);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.phone__time { font-family: var(--sans); font-size: 15px; font-weight: 600; color: #111; letter-spacing: -.01em; }
.phone__sys { display: inline-flex; align-items: center; gap: 6px; }
.phone__sys svg { display: block; }

/* breathing room between each page/section inside the phone */
.feature--site .phone__screen { background: #fff; }
/* EDM email-client chrome inside the phone */
.mailhead { padding: 0 0 10px; border-bottom: 1px solid #ECECEC; }
.mailhead__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-size: 12px; color: #0A84FF; letter-spacing: 0; }
.mailhead__subject { padding: 6px 16px 10px; font-family: var(--cjk); font-size: 18px; font-weight: 600; color: #1C1C1C; line-height: 1.3; }
.mailhead__from { display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.mailhead__avatar { width: 34px; height: 34px; border-radius: 50%; background: #F3C3CC; color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: 18px; flex: 0 0 auto; }
.mailhead__meta { display: flex; flex-direction: column; line-height: 1.35; font-family: var(--cjk); }
.mailhead__meta b { font-size: 13px; color: #1C1C1C; }
.mailhead__meta span { font-size: 11px; color: #9a9a9a; }
.mailhead__reply { margin-left: auto; color: #0A84FF; font-size: 17px; }
.mailfoot { padding: 20px 20px 34px; background: #F4F6F8; text-align: center; font-family: var(--cjk); }
.mailfoot p { font-size: 10.5px; color: #9a9a9a; line-height: 1.6; margin: 0; }
.mailfoot__links { margin-top: 8px; color: #b0b0b0; }
/* EDM: a row of phones, one email each */
.edmrow { display: flex; gap: clamp(16px, 2.5vw, 40px); justify-content: center; align-items: flex-start; flex-wrap: wrap; padding: 20px clamp(16px, 4vw, 40px) 30px; }
.phone--edm { width: clamp(248px, 26vw, 300px); height: auto; aspect-ratio: 372 / 764; border-radius: clamp(32px, 3.4vw, 42px); padding: clamp(9px, 1vw, 12px); }
.phone--edm .mailhead__subject { font-size: 15px; padding: 6px 14px 9px; }
.phone--edm .mailhead__avatar { width: 30px; height: 30px; font-size: 16px; }

/* Tmall product-page phones */
.phone--tmall { width: clamp(248px, 26vw, 300px); height: auto; aspect-ratio: 372 / 764; border-radius: clamp(32px, 3.4vw, 42px); padding: clamp(9px, 1vw, 12px); }
.phone--tmall .phone__screen { background: #f4f4f4; }
.phone--tmall .tmtop { position: sticky; top: 0; z-index: 4; background: #fff; }
.phone--tmall .phone__status { background: #fff; }
.tmhead { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; background: #fff; }
.tmhead__back { border: 0; background: none; font-size: 22px; line-height: 1; color: #222; padding: 0 2px; cursor: default; }
.tmhead__search { flex: 1; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #f1f1f1; border-radius: 100px; overflow: hidden; }
.tmhead__search span { font-family: var(--sans); font-size: 11px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmhead__ic { display: inline-flex; align-items: center; color: #333; }
.tmhead__dots { font-size: 16px; letter-spacing: -1px; line-height: 1; color: #333; }
.tmtabs { display: flex; align-items: center; gap: 20px; padding: 6px 14px 8px; background: #fff; border-bottom: 1px solid #eee; font-family: var(--sans); font-size: 13px; color: #666; }
.tmtabs .on { color: #111; font-weight: 700; position: relative; }
.tmtabs .on::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 18px; height: 2px; border-radius: 2px; background: #ff5000; }
.tmbar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 0; padding: 7px 8px 9px; background: #fff; border-top: 1px solid #eee; box-shadow: 0 -2px 8px rgba(0,0,0,.04); }
.tmbar__ic { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 auto; width: 40px; }
.tmbar__ic i { font-style: normal; font-family: var(--sans); font-size: 9px; color: #888; }
.tmbar__cart, .tmbar__buy { flex: 1; height: 34px; border: 0; border-radius: 100px; font-family: var(--sans); font-size: 12px; font-weight: 600; color: #fff; cursor: default; }
.tmbar__cart { background: linear-gradient(90deg,#ffb400,#ff8a00); margin-left: 6px; border-radius: 100px 0 0 100px; }
.tmbar__buy { background: linear-gradient(90deg,#ff6a00,#ff3d00); border-radius: 0 100px 100px 0; }
.phone--campaign .tmhead { border-bottom: 1px solid #eee; }
/* real Tmall interface header (cropped from the flagship-store screenshot) as fixed top shell */
.phone--realhdr .phone__screen { background: #fff; }
.phone--realhdr .tmtop { line-height: 0; }
.tmchrome { width: 100%; display: block; }
/* full screenshot phone (its own chrome baked in) */
.phone--full .phone__screen { background: #fff; }
.phone--full .phone__island { display: none; }
.phone--full .feature__strip img { width: 100%; display: block; }
/* store shell: real Tmall store top + bottom tab bar, work page scrolls between */
.phone--shell .phone__screen { background: #fff; }
.phone--shell .phone__island { display: none; }
.phone--shell .tmtop { position: sticky; top: 0; z-index: 4; line-height: 0; }
.phone--shell .tmbot { position: sticky; bottom: 0; z-index: 4; line-height: 0; }

/* Product-catalogue flipbook (page-turning e-book) */
.feature--flip .feature__media { display: flex; justify-content: center; }
.flip { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px clamp(16px, 4vw, 40px) 44px; perspective: 2600px; }
.flip__book { position: relative; width: min(760px, 92vw); aspect-ratio: 2482 / 1749; transform-style: preserve-3d; transition: transform .6s ease; }
.flip__book.is-closed { transform: translateX(-25%); }
.flip__book.is-end { transform: translateX(25%); }
.flip__leaf { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.4,.08,.2,1); cursor: pointer; }
.flip__leaf.flip--turned { transform: rotateY(-180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
/* single soft shadow behind the visible page(s) — never stacks */
.flip__shadow { position: absolute; top: 3%; bottom: 3%; left: 4%; width: 92%; transform: translateZ(-1px); box-shadow: 0 16px 38px rgba(0,0,0,.15); border-radius: 2px; transition: left .6s ease, width .6s ease; pointer-events: none; }
.flip__book.is-closed .flip__shadow { left: 52%; width: 44%; }
.flip__book.is-end .flip__shadow { left: 4%; width: 44%; }
.flip__face img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.flip__back { transform: rotateY(180deg); }
.flip__blank { background: #efe9e3; }
.flip__nav { display: flex; align-items: center; gap: 18px; }
.flip__btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #dcdcdc; background: #fff; font-size: 19px; line-height: 1; color: #222; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.flip__btn:hover { background: #111; color: #fff; border-color: #111; }
.flip__count { font-size: 12px; color: #777; min-width: 110px; text-align: center; }
/* EDM email body copy (marketing text) */
.phone--edm .feature__strip video { width: 100%; display: block; background: #000; }
.mailbody { padding: 16px 18px 4px; font-family: var(--sans); color: #3a3a3a; }
.mailbody p { font-size: 12.5px; line-height: 1.7; margin: 0 0 10px; }
.mailbody__greet { font-weight: 600; color: #1C1C1C; }
.mailbody__cta { display: block; text-align: center; margin: 4px auto 16px; padding: 12px 18px; background: #1C1C1C; color: #fff; border-radius: 100px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.mailbody__list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mailbody__list li { position: relative; padding-left: 20px; font-size: 12px; line-height: 1.5; color: #4a4a4a; }
.mailbody__list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #7FB2CC; font-weight: 700; }
.mailbody__sign { color: #6a6a6a; font-style: italic; }
.feature--site .phone__screen .feature__strip img { margin-bottom: 14px; }
.feature--site .phone__screen .feature__strip img:last-child { margin-bottom: 0; }
/* the 2nd slice (comparison table) breathes with side margins, not edge-to-edge */
.feature--site .phone__screen .feature__strip img:nth-child(2) {
  width: calc(100% - 40px); margin-left: 20px; margin-right: 20px;
}
/* screenshot mode: a row of mini phone mockups, each showing one full screen */
.phonerow {
  display: flex; gap: clamp(14px, 1.8vw, 26px);
  justify-content: center; align-items: flex-start; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px clamp(16px, 4vw, 40px) 10px;
}
.phonerow::-webkit-scrollbar { display: none; }
.phone-mini {
  flex: 0 0 auto; width: clamp(164px, 19vw, 208px);
  aspect-ratio: 1080 / 2348; background: #111;
  border-radius: clamp(24px, 2.6vw, 32px); padding: clamp(5px, .7vw, 8px);
  box-shadow: 0 20px 44px -20px rgba(0,0,0,.4);
}
.phone-mini__screen {
  width: 100%; height: 100%; overflow: hidden; background: #000;
  border-radius: clamp(19px, 2vw, 25px);
}
.phone-mini__screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* --- app showcase: rich menu lead + phone/design pairings --- */
.app__lead { margin-top: clamp(28px, 4vw, 48px); }
.app__lead--pair {
  display: grid; grid-template-columns: clamp(180px, 20vw, 220px) minmax(0, 620px);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 880px;   /* 桌面不讓圖文選單過大 */
}
.app__lead--pair .app__leadfig { min-width: 0; }
.app__leadphone .phone-mini { width: 100%; }
.app__leadfig { margin: 0; }
.app__leadfig img { width: 100%; display: block; border-radius: 12px; }
.app__leadfig figcaption {
  margin-top: 12px; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-soft);
}
.appscreen {
  display: grid; grid-template-columns: clamp(190px, 21vw, 232px) 1fr;
  gap: clamp(26px, 4vw, 64px); align-items: center;
  padding-top: clamp(38px, 5.5vw, 70px); margin-top: clamp(38px, 5.5vw, 70px);
  border-top: 1px solid var(--line);
}
.appscreen__phone { align-self: center; }
.appscreen__phone .phone-mini { width: 100%; }
.appscreen__cap {
  margin-top: 16px; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-soft); text-align: center;
}
/* auto-scrolling marquee of design cards (over-stimulated style) */
.appscreen__figs { min-width: 0; overflow: hidden; }
.marquee {
  display: flex; width: max-content;
  animation: marqueeL var(--dur, 34s) linear infinite;
  will-change: transform;
}
.marquee--rev { animation-name: marqueeR; }
.marquee--static { animation: none; }
.appscreen__figs:hover .marquee { animation-play-state: paused; }   /* 滑鼠移上暫停細看 */
.marquee__set { display: flex; flex: 0 0 auto; }
.marquee img {
  height: clamp(230px, 27vw, 330px); width: auto; display: block; flex: 0 0 auto;
  margin-right: clamp(10px, 1vw, 16px);
  border-radius: 8px; background: var(--paper); border: 1px solid var(--line-soft);
}
@keyframes marqueeL { from { transform: translateX(0); }        to { transform: translateX(-50%); } }
@keyframes marqueeR { from { transform: translateX(-50%); }     to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .appscreen__figs { overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 860px) {
  .appscreen { grid-template-columns: 1fr; gap: 24px; }
  .appscreen__phone { position: static; width: 62%; max-width: 240px; margin: 0 auto; }
  .appscreen__figs img { height: clamp(210px, 46vw, 300px); }
  .app__lead--pair { grid-template-columns: 1fr; }
  .app__leadphone { width: 62%; max-width: 240px; margin: 4px auto 0; }
  /* 手機：設計圖改成手動左右滑動，關掉自動跑馬燈才不會跟手指打架 */
  .appscreen__figs { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .appscreen__figs::-webkit-scrollbar { display: none; }
  .appscreen__figs .marquee { animation: none !important; }
  .appscreen__figs .marquee__set[aria-hidden="true"] { display: none; }
  .appscreen__figs .marquee img { scroll-snap-align: center; }
}
.phone__screen.dragging img { pointer-events: none; user-select: none; }
.phone__screen::-webkit-scrollbar { width: 0; height: 0; display: none; }
.phone__hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(18,18,18,.82); color: #fff; padding: 8px 15px; border-radius: 100px;
  letter-spacing: .04em; z-index: 4; pointer-events: none; white-space: nowrap;
  transition: opacity .4s ease; animation: hintBob 1.9s ease-in-out infinite;
}
.phone__hint.hide { opacity: 0; }
@keyframes hintBob { 0%,100%{ transform: translateX(-50%) translateY(0); } 50%{ transform: translateX(-50%) translateY(4px); } }
@media (max-width: 460px) {
  .phone { width: 300px; height: 616px; border-radius: 44px; padding: 11px; }
  .phone__screen { border-radius: 34px; }
  .phone__island { width: 100px; height: 24px; top: 18px; }
}
.feature__more {
  margin-top: 22px; background: transparent; border: 1px solid var(--ink); color: var(--ink);
  cursor: pointer; font-size: 11px; letter-spacing: .05em; padding: 12px 22px; border-radius: 100px; transition: all .2s;
}
.feature__more:hover { background: var(--accent, var(--ink)); border-color: var(--accent, var(--ink)); color: var(--accent-ink, var(--paper)); }

/* floating window (modal) for viewing all manual pages */
.sv { position: fixed; inset: 0; z-index: 210; display: none; align-items: center; justify-content: center;
  background: rgba(18,17,12,.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: clamp(16px,4vw,56px); }
.sv.open { display: flex; }
.sv__panel { position: relative; display: flex; flex-direction: column; width: min(920px, 100%); max-height: 90vh;
  background: var(--paper); border-radius: 12px; overflow: hidden;
  box-shadow: 0 50px 120px -25px rgba(0,0,0,.55), 0 8px 24px -8px rgba(0,0,0,.3); }
.sv__close { position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 17px;
  background: rgba(18,17,12,.62); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s; }
.sv__close:hover { background: rgba(18,17,12,.85); }
.sv__scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; background: var(--paper-2); }
.sv__scroll img { display: block; width: 100%; }
.sv--doc .sv__scroll img { border-bottom: 1px solid rgba(0,0,0,.12); }
.sv--doc .sv__scroll img:last-child { border-bottom: 0; }
.sv__scroll::-webkit-scrollbar { width: 10px; }
.sv__scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
/* chapter shortcuts at the bottom of the modal */
.sv__nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-top: 1px solid var(--line);
  background: var(--paper); flex-shrink: 0; scrollbar-width: none; }
.sv__nav::-webkit-scrollbar { display: none; }
.sv__nav button { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; white-space: nowrap;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s; flex-shrink: 0; }
.sv__nav button:hover { border-color: var(--accent, var(--ink)); background: var(--accent, var(--ink)); color: var(--accent-ink, var(--paper)); }

/* ---------- full series ---------- */
.series { padding: clamp(30px,6vh,60px) 0 0; border-top: 1px solid var(--line); }
.series__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: 0; cursor: pointer; padding: 6px 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.series__toggle .plus { font-size: 18px; transition: transform .3s ease; }
.series__toggle[aria-expanded="true"] .plus { transform: rotate(45deg); }
.series__toggle:hover { color: var(--accent, var(--ink-soft)); }
.series__body { padding-top: 34px; }
.series__cat { margin-bottom: 40px; }
.series__catname { display: flex; gap: 10px; align-items: baseline; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.series__catname .n { color: var(--ink-faint); }
.series__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(120px,15vw,168px), 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--paper-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.19,1,.22,1), opacity .3s; }
/* 含橫式圖的分類改用 flex:左對齊、間距一致、能並排就並排 */
.series__grid.has-wide { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.series__grid.has-wide .thumb:not(.thumb--wide) { width: clamp(120px, 15vw, 168px); }
/* 橫式縮圖：電腦版「高度」一致(與方格同高)、手機版改成「寬度」一致，排起來才整齊 */
.thumb--wide { flex: 0 0 auto; aspect-ratio: auto; background: transparent; }
.thumb--wide img { height: clamp(120px, 15vw, 168px); width: auto; max-width: 100%;
  display: block; object-fit: contain; }
@media (max-width: 760px) {
  .series__grid.has-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(120px,30vw,168px), 1fr)); }
  .thumb--wide { grid-column: 1 / -1; width: 100%; }
  .thumb--wide img { width: 100%; height: auto; }
}
.thumb:hover img { transform: scale(1.06); opacity: .92; }
.thumb .stack {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(18,17,12,.5); padding: 5px; border-radius: 5px;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.thumb .stack svg { display: block; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column;
  background: rgba(18,17,12,.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb.open { display: flex; }
.lb__top { display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px,4vw,40px); flex-shrink: 0; }
.lb__count { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.lb__close { background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 6px; }
.lb__stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 clamp(8px,4vw,60px); }
.lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.lb__nav:hover { background: rgba(255,255,255,.2); }
.lb__prev { left: clamp(8px,2vw,24px); } .lb__next { right: clamp(8px,2vw,24px); }
.lb__cap { text-align: center; color: rgba(255,255,255,.72); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 12px 20px 4px; min-height: 20px; }
.lb__strip { display: flex; gap: 6px; overflow-x: auto; padding: 12px clamp(16px,4vw,40px) 20px; flex-shrink: 0; scrollbar-width: thin; }
.lb__strip::-webkit-scrollbar { height: 6px; } .lb__strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }
.lb__strip button { flex: 0 0 auto; width: 58px; height: 58px; padding: 0; border: 1px solid transparent; background: none; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.lb__strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb__strip button.is-current { opacity: 1; border-color: #fff; }
.lb__strip button:hover { opacity: 1; }

/* ---------- other works (bottom of case study) ---------- */
.otherworks { border-top: 1px solid var(--ink); margin-top: clamp(44px,9vh,110px); }
.otherworks__head { padding-top: clamp(26px,4vh,44px); }
.otherworks .grid { padding-top: 30px; }

.nextproj { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(40px,8vh,90px) 0; border-top: 1px solid var(--ink); }
.nextproj .lbl { margin-bottom: 10px; }
.nextproj a { font-family: var(--cjk); font-size: clamp(22px,3.5vw,44px); font-weight: 600; letter-spacing: -0.02em; }
.nextproj .arrow { font-family: var(--mono); font-size: clamp(22px,3.5vw,40px); }

/* ---------- about ---------- */
.about { padding-top: clamp(50px,10vh,120px); padding-bottom: clamp(50px,10vh,120px); }
.about__lead { font-family: var(--cjk); font-size: clamp(22px,3.4vw,44px); line-height: 1.4; letter-spacing: -0.01em; max-width: 24ch; font-weight: 600; }
.about__cols { display: grid; grid-template-columns: 200px 1fr; gap: 40px; margin-top: clamp(40px,7vh,80px); padding-top: 40px; border-top: 1px solid var(--line); }
.about__cols + .about__cols { border-top: 1px solid var(--line-soft); }
.about__body { font-family: var(--cjk); font-size: 16px; line-height: 1.9; color: #2b2a24; max-width: 62ch; }
.services { list-style: none; display: grid; gap: 2px; }
.services li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--cjk); }
.services li span:last-child { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; text-align: right; flex: 0 1 auto; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--ink); padding: clamp(40px,7vh,72px) 0 40px; }
.foot__big { font-size: clamp(30px,7vw,90px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.foot__big a { border-bottom: 2px solid transparent; transition: border-color .3s; }
.foot__big a:hover { border-color: var(--ink); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 44px; }
.foot__row .col { display: flex; flex-direction: column; gap: 8px; }
.foot__row a.line, .foot__row span.line { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); letter-spacing: .03em; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .section, .about__cols { grid-template-columns: 1fr; gap: 14px; }
  .metagrid { grid-template-columns: 1fr 1fr; }
  .figs.duo { grid-template-columns: 1fr; }
  .filterbar { top: 57px; }
  .nav__links { gap: 16px; }
}
@media (max-width: 480px) {
  .metagrid { grid-template-columns: 1fr; }
  .nav__brand span.hideable { display: none; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* 產業經歷：主標下方帶說明小字 */
.services.industries li { align-items: flex-start; }
.services.industries .zh { display: flex; flex-direction: column; gap: 4px; }
.industries small { font-family: var(--cjk); font-size: 11.5px; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }

/* About：能力關鍵字 */
.about__caps { margin-top: 1.8em; padding-top: 1.2em; border-top: 1px solid var(--line-soft);
  font-size: 11px; letter-spacing: .06em; color: var(--ink-soft); text-transform: none; }
