:root {
  --paper: #faf9f5; --paper2: #f2f0e8; --line: #e3dacc; --ink: #141413; --ink2: #4e4b44; --ink3: #878276; --clay: #c96442;
  --display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --text: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --mono: 'Cascadia Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1240px; --pad: clamp(20px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }

/* language: show only the chosen one; .always stays (the brief in its own language) */
html[data-lang="en"] [lang="zh-Hant"]:not(.always), html[data-lang="zh-Hant"] [lang="en"]:not(.always) { display: none !important; }
html[data-lang="zh-Hant"] body { line-height: 1.75; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.kicker { font: 500 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--clay); }
html[data-lang="zh-Hant"] .kicker { letter-spacing: .1em; }
.muted { color: var(--ink2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 245, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font: 650 21px/1 var(--display); letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--clay); }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--ink2); }
.top nav a:hover { color: var(--ink); }
.langs { display: flex; border: 1px solid var(--ink); border-radius: 20px; overflow: hidden; }
.langs button { all: unset; cursor: pointer; padding: 5px 12px; font: 600 12px/1 var(--mono); letter-spacing: .08em; }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.langs button:focus-visible { outline: 2px solid var(--clay); outline-offset: -2px; }
.try { text-decoration: none; font: 600 14px/1 var(--text); padding: 8px 14px; border-radius: 20px; background: var(--clay); color: #fff; white-space: nowrap; }
.try:hover { background: #b5573a; }
@media (max-width: 720px) { .top nav { display: none; } .try { margin-left: auto; } .top .wrap { gap: 14px; } }

/* home */
.intro { padding: clamp(48px, 9vw, 104px) 0 clamp(32px, 5vw, 56px); }
.intro h1 { margin-top: 18px; max-width: 15em; text-wrap: balance; font: 650 clamp(34px, 5.6vw, 64px)/1.06 var(--display); letter-spacing: -.035em; }
html[data-lang="zh-Hant"] .intro h1 { letter-spacing: -.01em; line-height: 1.2; }
.intro p { margin-top: 22px; max-width: 40em; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink2); }
.try-cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn { display: inline-block; text-decoration: none; font: 600 16px/1 var(--text); padding: 14px 22px; border-radius: 28px; background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--clay); }
.try-cta span { font-size: 15px; color: var(--ink3); max-width: 34em; }
.hero { position: relative; }
.hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; background: var(--paper2); }
.hero figcaption, .cap { margin-top: 12px; font: 500 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
@media (max-width: 720px) { .hero img { aspect-ratio: 3 / 2; } }

.section { padding: clamp(56px, 8vw, 96px) 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 28px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font: 650 clamp(26px, 3vw, 34px)/1.1 var(--display); letter-spacing: -.02em; }
.section-head .count { font: 500 13px/1 var(--mono); color: var(--ink3); letter-spacing: .1em; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card { text-decoration: none; display: block; }
.card .ph { overflow: hidden; background: var(--paper2); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover img { transform: scale(1.025); }
.card h3 { margin-top: 16px; font: 600 clamp(19px, 1.8vw, 23px)/1.25 var(--display); letter-spacing: -.01em; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card .place { margin-top: 4px; font-size: 14px; color: var(--ink3); }
.card p { margin-top: 8px; color: var(--ink2); font-size: 16px; }

.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 0; margin: 0; }
@media (max-width: 860px) { .steps ol { grid-template-columns: 1fr; gap: 24px; } }
.steps li { list-style: none; border-top: 1px solid var(--line); padding-top: 18px; }
.steps .n { font: 500 13px/1 var(--mono); color: var(--clay); letter-spacing: .12em; }
.steps h3 { margin: 12px 0 8px; font: 600 20px/1.25 var(--display); }
.steps p { color: var(--ink2); font-size: 16px; }
.steps p.steps-try { margin-top: 32px; font-size: 17px; color: var(--ink); }
.steps-try a { color: var(--clay); font-weight: 600; text-decoration: none; white-space: nowrap; }

.film video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

.foot { margin-top: clamp(72px, 10vw, 128px); border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--ink3); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.foot p { max-width: 46em; }

/* work page */
.work-head { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }
.back { display: inline-block; margin-bottom: 28px; font-size: 15px; color: var(--ink2); text-decoration: none; }
.back:hover { color: var(--ink); }
.work-head h1 { margin-top: 16px; text-wrap: balance; font: 650 clamp(32px, 5vw, 58px)/1.08 var(--display); letter-spacing: -.03em; max-width: 18em; }
html[data-lang="zh-Hant"] .work-head h1 { letter-spacing: 0; line-height: 1.22; }
.work-head .place { margin-top: 12px; font-size: 18px; color: var(--ink3); }
.work-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper2); }
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); padding-top: clamp(36px, 5vw, 64px); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about .lede { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.55; }
html[data-lang="zh-Hant"] .about .lede { line-height: 1.8; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0 24px; border-top: 1px solid var(--ink); }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--ink3); white-space: nowrap; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.gallery a { text-decoration: none; display: block; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper2); }
.gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--ink2); }
.gallery a:hover figcaption { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* 3D viewer */
.viewer { position: relative; width: 100%; height: clamp(340px, calc((min(100vw, 1240px) - 2 * var(--pad)) * 9 / 16), 720px); background: #efede6; overflow: hidden; }
.viewer:fullscreen { height: 100vh; }
.v-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.v-poster-shade { position: absolute; inset: 0; background: rgba(20, 20, 19, .38); }
.v-stage { position: absolute; inset: 0; }
.v-stage canvas { width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.v-stage canvas:active { cursor: grabbing; }
.v-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; border-radius: 40px; cursor: pointer;
  padding: 16px 26px; background: var(--paper); color: var(--ink); font: 600 16px/1 var(--text); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.v-load:hover { background: #fff; }
.v-load small { font: 500 13px/1 var(--mono); color: var(--ink3); margin-left: 8px; letter-spacing: .04em; }
.v-status { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font: 500 14px/1 var(--mono); letter-spacing: .1em; }
.v-fail { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; text-align: center; max-width: 80%; }
.v-tools { display: none; position: absolute; right: 12px; bottom: 12px; gap: 8px; }
.v-tools button { border: 1px solid var(--line); background: rgba(250, 249, 245, .92); border-radius: 20px; padding: 7px 14px; font: 500 13px/1 var(--text); cursor: pointer; }
.v-hint { display: none; position: absolute; left: 14px; bottom: 16px; font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--ink3); }
.viewer.loading .v-load { display: none; }
.viewer.loading .v-status { display: block; }
.viewer.live .v-poster, .viewer.live .v-poster-shade, .viewer.live .v-load { display: none; }
.viewer.live .v-tools { display: flex; }
.viewer.live .v-hint { display: block; }
.viewer.failed .v-load, .viewer.failed .v-status { display: none; }
.viewer.failed .v-fail { display: block; }
@media (max-width: 600px) { .v-hint { display: none !important; } }

.walk video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

.brief .note { font-size: 14px; color: var(--ink3); margin-bottom: 14px; }
.brief blockquote { white-space: pre-line; padding: 24px 28px; background: var(--paper2); border-left: 3px solid var(--clay); font-size: 16px; line-height: 1.75; max-width: 54em; }
.brief .tr { margin-top: 28px; }
.brief .tr blockquote { background: transparent; border-left-color: var(--line); color: var(--ink2); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--ink); }
.pager a { padding: 20px 0; text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager small { display: block; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin-bottom: 8px; }
.pager span { font: 600 18px/1.3 var(--display); }
.pager a:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* lightbox */
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(16, 16, 15, .96); color: #f3f1ea; }
dialog.lightbox::backdrop { background: rgba(16, 16, 15, .96); }
.lb-frame { position: absolute; inset: 56px 72px 88px; display: flex; align-items: center; justify-content: center; }
.lb-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-bar { position: absolute; left: 72px; right: 72px; bottom: 28px; display: flex; justify-content: space-between; gap: 20px; font-size: 15px; }
.lb-count { font: 500 13px/1.6 var(--mono); color: #a9a598; }
.lightbox button { position: absolute; border: 0; background: none; color: #f3f1ea; cursor: pointer; font: 300 40px/1 var(--text); padding: 12px; }
.lb-close { top: 8px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { color: #fff; }
@media (max-width: 600px) { .lb-frame { inset: 56px 8px 96px; } .lb-bar { left: 16px; right: 16px; } .lb-prev, .lb-next { top: auto; bottom: 64px; transform: none; } }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card img { transition: none; } }
