/* 華藝 佛像・木雕美術館
   版型參考：ALIEN Art Centre（左側欄、/ 標題分區）＋ AVISION（留白、等比例作品帶、作品頁三欄） */
@font-face {
  font-family: "HuayiTitle";
  src: url("../assets/fonts/title.woff2?v=0329150b") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: #f4f1eb;
  --bg-2: #ebe6dd;          /* 圖框底色 */
  --ink: #1c1a17;
  --ink-2: #3f3a34;
  --muted: #807868;
  --line: #ddd6cb;
  --accent: #a8865c;        /* / 斜線與小標 */
  --dark: #1c1a17;
  --dark-2: #2a2723;
  --on-dark: #ece6dc;
  --brand: #4f4033;         /* logo 深褐 */

  /* 字體：--display 為標題（山海汲古宋刻，缺字時由思源宋體補上），--serif 為小標，--sans 為內文 */
  --display: "HuayiTitle", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;

  --rail: 84px;
  --pad: clamp(20px, 4.4vw, 72px);
  --ratio: 4 / 5;           /* 作品照片統一比例（直式 4:5） */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; padding-left: var(--rail);
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.95 var(--sans); letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; font-variant-numeric: lining-nums;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { list-style: none; padding: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; }
.skip:focus { top: 12px; }
.todo { color: var(--muted); }

/* 「/ 標題」 */
.slash { font-family: var(--display); font-weight: 400; letter-spacing: .02em; font-synthesis: none; }
.slash::before { content: "/"; color: var(--accent); font-family: var(--serif); font-weight: 400; margin-right: .35em; letter-spacing: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 26px;
  border: 1px solid var(--ink); font-size: 14px; font-weight: 500; letter-spacing: .04em;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-light { border-color: var(--on-dark); color: var(--on-dark); }
.btn-light:hover { background: var(--on-dark); color: var(--dark); }
.more { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .04em; color: var(--ink-2); }
.more::after { content: ""; width: 26px; height: 1px; background: currentColor; transition: width .35s var(--ease); }
a:hover .more::after, a.more:hover::after { width: 44px; }

/* 圖框：統一比例；照片接近 4:5 時填滿，去背或橫幅照片則完整置中 */
.frame { position: relative; display: block; width: 100%; aspect-ratio: var(--ratio); overflow: hidden; background: var(--bg-2); }
.frame > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.frame.fit > img { object-fit: contain; padding: 7%; }
.w-main.fit > img { padding: 0; }

/* ───────── 左側欄 ───────── */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--rail);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 26px 0 30px; background: var(--bg); border-right: 1px solid var(--line);
}
.menu-btn { width: 40px; height: 40px; display: grid; place-content: center; gap: 6px; }
.menu-btn span { display: block; width: 20px; height: 1px; background: var(--ink); transition: transform .35s var(--ease), opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.rail-brand { display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--brand); margin: auto 0; }
.rail-brand svg { width: 42px; height: auto; }
.rail-brand span { writing-mode: vertical-rl; font-family: var(--serif); font-weight: 500; font-size: 14px; letter-spacing: .2em; color: var(--ink-2); }
.rail-foot { display: none; }

/* 展開選單 */
.menu {
  position: fixed; inset: 0 auto 0 var(--rail); z-index: 45; width: min(460px, calc(100vw - var(--rail)));
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 72px 48px 40px; background: var(--bg); border-right: 1px solid var(--line);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .55s var(--ease), visibility 0s .55s;
  overflow-y: auto;
}
.menu-open .menu { transform: none; visibility: visible; transition: transform .55s var(--ease); }
.menu-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(28,26,23,.28); opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.menu-open .menu-scrim { opacity: 1; visibility: visible; transition: opacity .4s; }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a { display: flex; align-items: baseline; padding: 16px 0; font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: .04em; transition: padding .35s var(--ease); }
.menu-list a:hover { padding-left: 10px; }
.menu-list a::before { content: "/"; color: var(--accent); font-family: var(--serif); margin-right: .4em; }
.menu-list a span { flex: 1; }
.menu-list small { font: 400 14px var(--sans); color: var(--muted); }
.menu-info { font-size: 13px; color: var(--ink-2); line-height: 2; }
.menu-info b { font-weight: 400; font-family: var(--serif); font-size: 15px; display: block; margin-bottom: 6px; color: var(--ink); }

/* 頂部小導覽 */
.topnav { position: absolute; top: 0; right: 0; left: var(--rail); z-index: 10; display: flex; justify-content: flex-end; gap: 34px; padding: 30px var(--pad); font-size: 13px; letter-spacing: .04em; pointer-events: none; }
.topnav a { position: relative; color: var(--ink-2); pointer-events: auto; }
.topnav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.topnav a:hover::after, .topnav a[aria-current="page"]::after { transform: scaleX(1); }
.topnav a[aria-current="page"] { color: var(--ink); }

/* ───────── 首頁主視覺：經文背景＋去背佛像輪播 ───────── */
.hero { position: relative; isolation: isolate; height: 100vh; height: 100svh; min-height: 640px; max-height: 1100px; background: var(--dark); color: var(--on-dark); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -3; background: url("../assets/bg/sutra.jpg?v=98614c33") center / cover no-repeat; opacity: .85; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 50% 55%, transparent 0%, rgba(21,18,15,.55) 70%, rgba(21,18,15,.92) 100%),
              linear-gradient(180deg, rgba(21,18,15,.75), transparent 22%, transparent 78%, rgba(21,18,15,.9)); }
.hero-face { position: absolute; z-index: -2; top: 0; bottom: 0; right: 0; width: 46%;
  background: url("../assets/about/face.webp?v=ff46e42e") 30% 18% / cover no-repeat;
  filter: grayscale(.6) sepia(.3) brightness(.26) contrast(1.2); opacity: .75;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%); }
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr minmax(0, 1.05fr) 1fr; align-items: center;
  padding: 110px var(--pad) 64px; opacity: 0; visibility: hidden; transition: opacity 1.1s var(--ease), visibility 0s 1.1s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity 1.1s var(--ease); }
.slide-art { grid-column: 2; grid-row: 1; height: 100%; min-height: 0; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.slide-art::before { content: ""; position: absolute; left: 50%; top: 52%; width: 90%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(225,180,120,.30), rgba(225,180,120,.08) 55%, transparent); pointer-events: none; }
.slide-art img { position: relative; max-height: 100%; width: auto; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); transform: translateY(18px) scale(.985); transition: transform 1.6s var(--ease); }
.slide.on .slide-art img { transform: none; }
.slide-text { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; padding-right: clamp(16px, 3vw, 48px); max-width: 360px; }
.slide-kicker { font: 400 13px var(--sans); letter-spacing: .06em; color: var(--accent); margin-bottom: 14px; }
.slide-title { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.25; letter-spacing: .08em; color: #fbf3e8; }
.slide-sub { font-family: var(--serif); font-size: 15px; letter-spacing: .16em; color: #e1c3a8; margin-top: 8px; }
.slide-meta { margin: 22px 0 32px; font-size: 13px; line-height: 2; color: #cfc2b1; }
.slide-meta span { display: block; }
.slide-text > * { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.slide.on .slide-text > * { opacity: 1; transform: none; }
.slide.on .slide-text > :nth-child(2) { transition-delay: .12s; }
.slide.on .slide-text > :nth-child(3) { transition-delay: .2s; }
.slide.on .slide-text > :nth-child(4) { transition-delay: .28s; }
.slide.on .slide-text > :nth-child(5) { transition-delay: .36s; }
.hero-nav { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 110px; }
.hero-count { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; letter-spacing: .2em; padding-left: .2em; }
.hero-count i { width: 26px; height: 1px; background: currentColor; }
.hero-count .tot { opacity: .5; }
.hero-arrows { display: flex; flex-direction: column; gap: 14px; }
.hero-arrows button { width: 40px; height: 40px; display: grid; place-items: center; color: inherit; opacity: .65; transition: opacity .3s; }
.hero-arrows button:hover { opacity: 1; }
.hero-arrows svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.btn-hero { background: #4a3f3a; border-color: #4a3f3a; color: #f1e8dc; letter-spacing: .2em; padding-left: 2.2em; padding-right: 2.2em; }
.btn-hero:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--dark); }
/* 側欄在深色主視覺上 */
.rail { transition: background .5s var(--ease), border-color .5s var(--ease); }
.rail-brand, .rail-brand span, .menu-btn span { transition: color .5s var(--ease), background .5s var(--ease); }
body.on-dark:not(.menu-open) .rail { background: var(--dark); border-color: rgba(236,230,220,.1); }
body.on-dark:not(.menu-open) .rail-brand { color: #e1c3a8; }
body.on-dark:not(.menu-open) .rail-brand span { color: var(--on-dark); }
body.on-dark:not(.menu-open) .menu-btn span { background: var(--on-dark); }
.scroll-cue { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); padding: 12px; }
.scroll-cue i { display: block; width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
[data-page="home"] .topnav a { color: var(--on-dark); }
[data-page="home"] .topnav a:hover { color: #fff; }

/* ───────── 精選作品（大標題夾著一排作品） ───────── */
.h-hero { padding-top: clamp(80px, 10vw, 150px); }
.h-row { display: grid; grid-template-columns: 1fr 1.25fr; align-items: end; padding: 0 var(--pad); }
.h-row-top { padding-bottom: clamp(20px, 2.6vw, 36px); }
.h-row-bottom { padding-top: clamp(20px, 2.6vw, 36px); align-items: start; }
.h-lead { font-size: 14px; line-height: 2; color: var(--ink-2); align-self: start; }
.h-title { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(40px, 6vw, 100px); line-height: 1.12; letter-spacing: .02em; }
.h-row-bottom .h-title { grid-column: 2; padding-left: 1.2em; }
.h-scroll { display: none; }
.h-strip { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); }
.h-tile { position: relative; overflow: hidden; display: block; }
.h-tile .frame > img { transition: transform 1.4s var(--ease); }
.h-tile:hover .frame > img { transform: scale(1.05); }
.h-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(20,18,15,.72)); color: #f4efe6;
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease);
}
.h-tile:hover .h-cap, .h-tile:focus-visible .h-cap { opacity: 1; transform: none; }
.h-cap small { display: block; font: 400 12px var(--sans); letter-spacing: .04em; opacity: .8; }
.h-cap b { font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: .04em; }

/* ───────── 區塊 ───────── */
.sec { padding: clamp(80px, 10vw, 150px) var(--pad) 0; }
.sec-tight { padding-top: clamp(48px, 6vw, 90px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 56px); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font-size: clamp(24px, 2.4vw, 32px); }
.sec-en { display: none; }
.sec-dark { background: var(--dark); color: var(--on-dark); margin-top: clamp(80px, 10vw, 150px); padding-bottom: clamp(80px, 10vw, 140px); }
.sec-dark .sec-head { border-color: rgba(236,230,220,.16); }

/* 系列列表（ALIEN 式：圖／文／標題交錯） */
.s-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(20px, 3vw, 48px); align-items: center; padding: clamp(28px, 3.4vw, 48px) 0; border-bottom: 1px solid var(--line); }
.s-row:first-child { padding-top: 0; }
.s-row:nth-child(even) .s-img { order: 3; }
.s-row:nth-child(even) .s-name { order: 1; text-align: right; }
.s-row:hover .s-img .frame > img { transform: scale(1.04); }
.s-text p { color: var(--ink-2); font-size: 14px; line-height: 2.05; margin-bottom: 20px; }
.s-text .s-count { font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; margin-bottom: 14px; }
.s-name h3 { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(26px, 2.8vw, 40px); letter-spacing: .04em; }
.s-name h3::before { content: "/"; color: var(--accent); font-family: var(--serif); font-weight: 400; margin-right: .3em; }
.s-name small { display: none; }

/* 系列主圖帶（2000×1333：上下各 10% 寬的透明區，主體從照片帶凸出；左側 40% 不會有凸出物） */
.s-band { display: block; margin: 0 calc(-1 * var(--pad)); }
.s-band + .s-band { margin-top: clamp(40px, 6vw, 96px); }
.sb-head { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 6px 22px; flex-wrap: wrap; padding: 0 var(--pad); max-width: 44%; margin-bottom: calc(clamp(12px, 1.6vw, 26px) - 10%); }
.sb-head h3 { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.2; letter-spacing: .05em; }
.sb-head h3::before { content: "/"; color: var(--accent); font-family: var(--serif); margin-right: .3em; }
.sb-count { font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; }
.sb-media { position: relative; overflow: visible; }
.sb-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 1.2s var(--ease); transform-origin: 50% 85%; }
.s-band:hover .sb-media img { transform: scale(1.015); }
.sb-foot { position: relative; z-index: 1; display: grid; justify-items: start; gap: 14px; padding: 0 var(--pad); max-width: 42%; margin-top: calc(clamp(16px, 1.8vw, 28px) - 10%); }
.sb-foot p { color: var(--ink-2); font-size: 14px; line-height: 2; }

/* 工藝 */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.steps li { counter-increment: s; padding: 0 clamp(12px, 1.8vw, 28px) 0 0; }
.steps li + li { padding-left: clamp(12px, 1.8vw, 28px); border-left: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); display: block; font: 400 40px/1 var(--display); color: var(--accent); margin-bottom: 20px; }
.steps b { display: block; font: 600 20px var(--serif); letter-spacing: .04em; margin-bottom: 10px; }
.steps p { font-size: 13.5px; color: var(--ink-2); line-height: 2; }

/* 木材 */
.woods { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 5vw, 80px); }
.woods > div { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.woods dt { font: 600 17px var(--serif); letter-spacing: .04em; }
.woods dt small { display: none; }
.woods dd { font-size: 13.5px; color: var(--ink-2); line-height: 1.95; }

/* 關於 */
.about { display: grid; grid-template-columns: 1.2fr 1fr .55fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.about-img img { width: 100%; }
.about-trophy img { max-height: 380px; width: auto; margin: 0 auto; }
.about-img figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; letter-spacing: .04em; }
.about-quote { font-synthesis: none; font: 400 clamp(30px, 3.4vw, 48px)/1.3 var(--display); letter-spacing: .04em; margin-bottom: 28px; }
.about-text p:not(.about-quote) { color: var(--ink-2); line-height: 2.1; }
.about-text p + p { margin-top: 14px; }
.about-text b { font-weight: 500; color: var(--ink); }

/* 聯繫 */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); }
.contact-lead { color: #bdb4a7; line-height: 2.1; max-width: 26em; }
.contact-list > div { display: grid; grid-template-columns: 7em 1fr; padding: 15px 0; border-bottom: 1px solid rgba(236,230,220,.16); }
.contact-list > div:first-child { border-top: 1px solid rgba(236,230,220,.16); }
.contact-list dt { color: var(--accent); font-size: 13px; letter-spacing: .04em; }
.sec-dark .todo { color: #8d8478; }

.site-foot { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 32px var(--pad); font-size: 12px; color: var(--muted); letter-spacing: .04em; border-top: 1px solid var(--line); }

/* ───────── 系列頁 ───────── */
.page-head { padding: 96px var(--pad) 0; }
.crumbs { font-size: 12px; letter-spacing: .04em; color: var(--muted); margin-bottom: clamp(28px, 4vw, 56px); }
.crumbs a:hover { color: var(--ink); }
.crumbs i { font-style: normal; margin: 0 .8em; }
.ph-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; padding-bottom: clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.ph-en { display: none; }
.ph-title { font-family: var(--display); font-size: clamp(40px, 5.4vw, 84px); font-weight: 400; font-synthesis: none; line-height: 1.15; letter-spacing: .02em; }
.ph-intro { color: var(--ink-2); line-height: 2.1; }
.ph-count { font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; margin-top: 14px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 3vw, 48px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; background: var(--dark); color: var(--on-dark); }
.feature .frame { height: 100%; }
.feature:hover .frame > img { transform: scale(1.04); }
.f-text { display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 36px); position: relative; }
.f-text small { font: 400 13px var(--sans); color: #a99f91; letter-spacing: .04em; }
.f-text h3 { font-synthesis: none; font: 400 clamp(22px, 2vw, 30px) var(--display); letter-spacing: .04em; margin-top: 10px; }
.f-text p { font-size: 13px; color: #bdb4a7; line-height: 2; margin-top: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.f-text .more { color: var(--on-dark); margin-top: 18px; }
.f-num { margin-top: auto; padding-top: 16px; align-self: flex-end; font: 400 clamp(48px, 5vw, 76px)/1 var(--display); color: #f0e9de; }

.chips { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.chip { font-size: 13px; letter-spacing: .04em; color: var(--muted); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; }
.chip small { font-size: 12px; margin-left: 4px; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(36px, 4vw, 64px) clamp(16px, 2vw, 32px); }
.card a { display: block; }
.card:hover .frame > img { transform: scale(1.04); }
.card-cap { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding-top: 14px; }
.card-cap h3 { font: 600 17px/1.5 var(--serif); letter-spacing: .04em; }
.card-cap .code { font: 400 12px var(--sans); color: var(--muted); letter-spacing: .04em; padding-top: 4px; }
.card-cap p { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.tag { position: absolute; top: 12px; left: 12px; z-index: 1; font: 500 12px var(--sans); letter-spacing: .04em; background: var(--bg); padding: 3px 10px; }
.card[hidden] { display: none; }

/* ───────── 作品頁 ───────── */
.w-top { display: grid; grid-template-columns: 1fr minmax(0, 1.25fr) 1.15fr; gap: clamp(20px, 3.6vw, 64px); padding: 0 var(--pad); align-items: start; }
.w-meta { position: sticky; top: 40px; font-size: 12.5px; }
.w-meta div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.w-meta div:first-child { border-top: 1px solid var(--line); }
.w-meta dt { font: 400 12px var(--sans); color: var(--muted); letter-spacing: .04em; }
.w-meta dd { letter-spacing: .04em; margin-top: 2px; }
.w-main { cursor: zoom-in; }
.w-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.w-thumbs button { opacity: .5; transition: opacity .25s; }
.w-thumbs button:hover, .w-thumbs button[aria-current="true"] { opacity: 1; }
.w-thumbs .frame.fit > img { padding: 4%; }
.w-intro { position: sticky; top: 40px; }
.w-series { font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; }
.w-name { font-synthesis: none; font: 400 clamp(36px, 4vw, 64px)/1.2 var(--display); letter-spacing: .04em; margin-top: 10px; }
.w-sub { font: 500 16px var(--serif); color: var(--accent); letter-spacing: .04em; margin-top: 14px; }
.w-desc { color: var(--ink-2); line-height: 2.1; margin-top: 28px; max-width: 30em; }
.w-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 36px; }

.story { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 6vw, 110px); align-items: start; }
.story-title { position: sticky; top: 40px; font: 400 clamp(30px, 3.4vw, 52px)/1.4 var(--display); font-synthesis: none; letter-spacing: .04em; }
.story-body p { font-size: 16px; line-height: 2.25; color: var(--ink-2); max-width: 36em; }
.story-body p + p { margin-top: 1.4em; }

/* 雕刻細節：左側固定畫面＋右側段落；捲動時畫面推近到對應部位 */
.w-details { background: var(--dark); color: var(--on-dark); margin-top: clamp(80px, 10vw, 150px); padding: clamp(80px, 9vw, 130px) var(--pad) clamp(40px, 5vw, 80px); }
.w-details .sec-head { border-color: rgba(236,230,220,.16); }
.d-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); }
.d-stage-col { position: sticky; top: 40px; align-self: start; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; }
.d-stage { background: var(--bg-2); width: min(100%, calc((100vh - 80px) * .8)); }
.d-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.d-layer.on { opacity: 1; }
.d-layer img { position: absolute; left: 50%; top: 50%; max-width: none; transition: transform 1.1s var(--ease); will-change: transform; }
.d-ticks { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.d-ticks li { display: flex; align-items: center; gap: 10px; font: 400 13px var(--sans); color: #6f675d; transition: color .4s; cursor: pointer; }
.d-ticks li::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .4s var(--ease); }
.d-ticks li.on { color: var(--on-dark); }
.d-ticks li.on::before { width: 32px; }
.d-steps > li { min-height: 76vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; opacity: .3; transition: opacity .6s; }
.d-steps > li.on { opacity: 1; }
.d-steps > li:first-child { justify-content: flex-start; padding-top: 0; min-height: 64vh; }
.d-num { font: 400 clamp(56px, 6vw, 96px)/1 var(--display); color: #f0e9de; }
.d-steps h3 { font-synthesis: none; font: 400 clamp(22px, 2vw, 30px) var(--display); letter-spacing: .04em; margin: 18px 0 16px; }
.d-steps p { color: #bdb4a7; line-height: 2.15; max-width: 28em; }
.d-inline { display: none; }

.members { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 36px); }
.members a:hover .frame > img { transform: scale(1.04); }
.members h3 { font: 600 17px var(--serif); letter-spacing: .04em; margin-top: 14px; }
.members p { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

.specs { max-width: 760px; }
.specs div { display: grid; grid-template-columns: 10em 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--serif); font-weight: 600; letter-spacing: .04em; }
.specs dd { font: 400 15px var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.specs-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

.cta { display: grid; justify-items: start; gap: 16px; max-width: 640px; }
.cta-big { font-synthesis: none; font: 400 clamp(28px, 3vw, 44px)/1.4 var(--display); letter-spacing: .04em; }
.cta p:not(.cta-big) { color: #bdb4a7; }
.cta .btn { margin-top: 12px; }
.w-cta { padding-top: clamp(64px, 8vw, 110px); }
.w-cta.joined { margin-top: 0; border-top: 1px solid rgba(236,230,220,.12); }

.w-pager { display: grid; grid-template-columns: 1fr 1fr; }
.w-pager a { display: flex; flex-direction: column; gap: 6px; padding: 36px var(--pad); transition: background .3s; }
.w-pager a:hover { background: var(--bg-2); }
.w-pager a:last-child { text-align: right; grid-column: 2; }
.w-pager a + a { border-left: 1px solid var(--line); }
.w-pager small { font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; }
.w-pager b { font: 600 20px var(--serif); letter-spacing: .04em; }

/* 大圖檢視 */
.viewer { position: fixed; inset: 0; z-index: 80; background: var(--bg); opacity: 0; transition: opacity .3s; }
.viewer[hidden] { display: none; }
.viewer.open { opacity: 1; }
.v-figure { position: absolute; inset: 64px 80px; overflow: hidden; display: grid; place-items: center; }
.v-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; transition: transform .45s var(--ease); }
.v-figure.zoomed .v-img { transform: scale(2.3); cursor: zoom-out; }
.v-hint { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.v-figure.zoomed .v-hint { opacity: 0; }
.v-close, .v-prev, .v-next { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; }
.v-close { top: 14px; right: 18px; }
.v-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.v-next { right: 16px; top: 50%; transform: translateY(-50%); }
.v-close svg, .v-prev svg, .v-next svg { width: 24px; height: 24px; }
.v-count { position: absolute; top: 24px; left: 28px; font: 400 13px var(--sans); color: var(--muted); letter-spacing: .04em; }
body.lock { overflow: hidden; }

/* 進場 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ───────── 響應式 ───────── */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: 1fr; }
  .w-top { grid-template-columns: minmax(0, 1.2fr) 1fr; }
  .w-media { grid-row: 1 / 3; }
  .w-meta { grid-column: 2; grid-row: 2; position: static; }
  .w-intro { position: static; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .steps li:nth-child(4) { border-left: 0; padding-left: 0; }
  .about { grid-template-columns: 1fr 1fr; }
  .about-text { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 860px) {
  :root { --rail: 0px; }
  body { padding-top: 60px; }
  .rail { inset: 0 0 auto 0; width: auto; height: 60px; flex-direction: row; padding: 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-brand { flex-direction: row; gap: 10px; position: absolute; left: 50%; transform: translateX(-50%); }
  .rail-brand svg { width: 34px; }
  .rail-brand span { writing-mode: horizontal-tb; letter-spacing: .04em; font-size: 13px; }
  .rail-foot { display: none; }
  .menu { inset: 60px 0 0 0; width: auto; padding: 28px 24px; transform: translateY(-8px); opacity: 0; transition: opacity .35s, transform .35s var(--ease), visibility 0s .35s; }
  .menu-open .menu { opacity: 1; transform: none; transition: opacity .35s, transform .35s var(--ease); }
  .topnav { display: none; }

  .hero { height: auto; min-height: 0; max-height: none; }
  .hero-slides { position: relative; height: min(140vw, 760px); min-height: 600px; }
  .slide { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 84px var(--pad) 72px; }
  .slide-art { grid-column: 1; grid-row: 1; }
  .slide-text { grid-column: 1; grid-row: 2; justify-self: center; text-align: center; padding: 18px 0 0; }
  .slide-meta { margin: 10px 0 20px; }
  .slide-meta span { display: inline; }
  .slide-meta span + span::before { content: "　"; }
  .hero-face { width: 100%; opacity: .5; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
  .hero-nav { top: auto; bottom: 14px; transform: none; flex-direction: row; gap: 16px; left: var(--pad); right: var(--pad); justify-content: space-between; }
  .hero-count { flex-direction: row; font-size: 15px; }
  .hero-count i { width: 20px; }
  .hero-arrows { flex-direction: row; gap: 4px; }
    .scroll-cue { display: none; }
  .h-hero { padding-top: 64px; }
  .h-row { grid-template-columns: 1fr; gap: 16px; }
  .h-row-bottom .h-scroll { display: none; }
  .h-row-bottom .h-title { grid-column: 1; text-align: right; padding-left: 0; }
  .h-lead br { display: none; }
  .h-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .h-strip::-webkit-scrollbar { display: none; }
  .h-tile { flex: 0 0 44vw; scroll-snap-align: start; }
  .h-cap { opacity: 1; transform: none; padding: 30px 10px 10px; }
  .h-cap b { font-size: 14px; }

  .s-row, .s-row:nth-child(even) { grid-template-columns: 1fr 1fr; }
  .s-row .s-img, .s-row:nth-child(even) .s-img { order: 0; grid-row: 1 / 3; }
  .s-row:nth-child(even) .s-name { order: 0; text-align: left; }
  .s-text p { font-size: 13px; }
  .sb-head, .sb-foot { max-width: none; }
  .sb-head { margin-bottom: 14px; }
  .sb-foot { margin-top: 18px; }
  .woods { grid-template-columns: 1fr; }
  .woods > div { grid-template-columns: 1fr; gap: 4px; }
  .contact { grid-template-columns: 1fr; }

  .page-head { padding-top: 32px; }
  .ph-grid { grid-template-columns: 1fr; gap: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; }
  .card-cap { grid-template-columns: 1fr; }
  .card-cap h3 { font-size: 15px; }
  .f-text p { -webkit-line-clamp: 3; }

  .w-top { grid-template-columns: 1fr; }
  .w-meta, .w-media { grid-column: auto; grid-row: auto; }
  .w-intro { order: -1; }
  .w-meta { order: 1; }
  .w-thumbs { grid-template-columns: repeat(5, 1fr); }
  .story { grid-template-columns: 1fr; }
  .story-title { position: static; }
  .story-body p { font-size: 15px; }

  .d-wrap { grid-template-columns: 1fr; }
  .d-stage-col { display: none; }
  .d-steps > li, .d-steps > li:first-child { min-height: 0; opacity: 1; padding: 0 0 56px; }
  .d-inline { display: block; margin-bottom: 22px; }
  .d-inline .d-layer { opacity: 1; }
  .d-num { font-size: 56px; }

  .members { grid-template-columns: repeat(2, 1fr); }
  .specs div { grid-template-columns: 1fr; gap: 2px; }
  .w-pager b { font-size: 16px; }
  .v-figure { inset: 64px 12px; }
  .v-prev, .v-next { top: auto; bottom: 10px; transform: none; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .steps li, .steps li + li { border-left: 0; padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; }
  .steps li::before { grid-row: 1 / 3; font-size: 34px; margin: 0; }
  .s-row, .s-row:nth-child(even) { grid-template-columns: 1fr; }
  .s-row .s-img, .s-row:nth-child(even) .s-img { grid-row: auto; }
  .s-row .s-name { order: -1; }
  .about { grid-template-columns: 1fr; }
  .about-trophy img { max-height: 280px; }
  .feature { grid-template-columns: 1fr 1fr; }
  .f-text p { display: none; }
  .f-num { font-size: 44px; }
  .w-pager { grid-template-columns: 1fr; }
  .w-pager a:last-child { grid-column: auto; }
  .w-pager a + a { border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* 404 */
.nf { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px; }
.nf-text { color: var(--ink-2); }
