:root {
  --bg: #0b0b0d;
  --bg-2: #121215;
  --line: #222227;
  --text: #d6d6da;
  --muted: #8c8c94;
  --dim: #5d5d64;
  --white: #f2f2f4;
  --gap: clamp(10px, 1.6vw, 22px);
  --pad: clamp(18px, 5vw, 72px);
  --serif: "Cormorant Garamond", "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.7 var(--sans);
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--white); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--white); color: var(--bg); padding: 6px 12px;
}
.skip:focus { left: 8px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  transition: background .35s, padding .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(11, 11, 13, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom-color: var(--line);
}
.nav__brand { font: 500 17px/1 var(--serif); letter-spacing: .14em; color: var(--white); }
.nav__links { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav__links a {
  font-size: 13px; letter-spacing: .3em; color: var(--text);
  padding: 6px 0; transition: color .2s;
}
.nav__links a:hover { color: var(--white); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}
/* 幻燈片：停留 6s（--hold）＋交叉淡化 1.4s（--fade），Ken Burns 涵蓋整段可見時間 */
.hero__slides {
  --hold: 6s; --fade: 1.4s;
  position: absolute; inset: 0; z-index: 0;
  animation: heroIn 2s ease-out both;
}
@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 55%;
  opacity: 0;
  transition: opacity var(--fade) ease;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
.hero__img.is-active { opacity: 1; }
.hero__img.is-zoom { animation: kenBurns calc(var(--hold) + var(--fade)) linear both; will-change: transform; }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) {
  .hero__slides, .hero__img.is-zoom { animation: none; }
  .hero__img { transition: none; }
  .hero__dots { display: none; }
}
.hero__dots {
  position: absolute; z-index: 2;
  right: calc(var(--pad) - 6px); bottom: max(22px, calc(env(safe-area-inset-bottom) + 10px));
  display: flex; gap: 2px;
}
.hero__dots[hidden] { display: none; }
.hero__dot {
  display: grid; place-items: center;
  width: auto; height: 20px; padding: 0 5px;
  background: none; border: 0; cursor: pointer;
}
.hero__dot::before {
  content: ""; display: block;
  width: 5px; height: 5px; border-radius: 3px;
  background: rgba(242,242,244,.32);
  transition: width .6s ease, background-color .6s ease;
}
.hero__dot:hover::before { background: rgba(242,242,244,.6); }
.hero__dot[aria-current="true"]::before { width: 18px; background: rgba(242,242,244,.78); }
.hero__dot:focus-visible { outline-offset: 0; }
.hero__shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(11,11,13,.55) 0%, rgba(11,11,13,0) 22%),
    linear-gradient(to top, rgba(11,11,13,.92) 0%, rgba(11,11,13,.35) 34%, rgba(11,11,13,0) 60%);
}
.hero__text {
  position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(70px, 12vh, 130px);
  color: var(--white);
}
.hero__name {
  margin: 0;
  font: 400 clamp(46px, 9vw, 120px)/.95 var(--serif);
  letter-spacing: .04em;
}
.hero__role {
  margin: 18px 0 0;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: .5em; text-transform: uppercase;
  color: var(--text);
}
.hero__ig {
  display: inline-block; margin-top: 22px;
  font-size: 13px; letter-spacing: .12em; color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 3px;
  transition: color .2s, border-color .2s;
}
.hero__ig:hover { color: var(--white); border-color: var(--white); }
.hero__cue {
  position: absolute; z-index: 2; right: var(--pad); bottom: clamp(70px, 12vh, 130px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .4em; color: var(--muted);
  writing-mode: vertical-rl;
}
.hero__cue::after {
  content: ""; width: 1px; height: 56px;
  background: linear-gradient(var(--muted), transparent);
}

/* ---------- section heads ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px; margin-bottom: clamp(24px, 4vw, 48px);
}
h2 {
  margin: 0;
  font: 400 13px/1 var(--sans);
  letter-spacing: .5em; color: var(--muted);
}
.section-head__count { margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--dim); }

/* ---------- works / masonry ---------- */
.works { padding: clamp(64px, 10vw, 130px) var(--pad) clamp(40px, 6vw, 80px); }
.masonry { display: flex; gap: var(--gap); align-items: flex-start; }
.masonry__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(22px, 2.6vw, 40px); }

.work { margin: 0; }
.work__btn {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2);
  cursor: zoom-in; overflow: hidden; position: relative;
}
.work__btn img {
  width: 100%; height: auto;
  opacity: 0; transition: opacity .8s ease, transform 1.2s cubic-bezier(.2,.7,.2,1), filter .5s;
  filter: saturate(.92);
}
.work__btn img.is-loaded { opacity: 1; }
.work__btn:hover img { transform: scale(1.025); filter: saturate(1.05); }
.work__cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 12px;
}
.work__title { font: 400 16px/1.35 var(--serif); color: var(--white); letter-spacing: .06em; }
.work__loc { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); text-align: right; }
.noscript { color: var(--muted); }

/* ---------- videos ---------- */
.videos { padding: clamp(40px, 6vw, 80px) var(--pad) clamp(60px, 9vw, 120px); }
.reels {
  display: grid; gap: clamp(22px, 2.6vw, 40px) var(--gap);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.reel { margin: 0; min-width: 0; }
.reel__btn {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2);
  cursor: pointer; overflow: hidden; position: relative;
  aspect-ratio: 9 / 16;
}
.reel__btn img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s ease, transform 1.2s cubic-bezier(.2,.7,.2,1), filter .5s;
  filter: saturate(.92) brightness(.9);
}
.reel__btn img.is-loaded { opacity: 1; }
.reel__btn:hover img { transform: scale(1.03); filter: saturate(1.05) brightness(1); }
.reel__btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(11,11,13,.5), rgba(11,11,13,0) 45%);
}
.reel__play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(11,11,13,.42);
  border: 1px solid rgba(242,242,244,.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .25s, border-color .25s, transform .25s;
}
.reel__play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--white); }
.reel__btn:hover .reel__play { background: rgba(11,11,13,.62); border-color: var(--white); transform: scale(1.06); }
.reel .work__cap { flex-wrap: wrap; gap: 2px 12px; }

/* ---------- about ---------- */
.about {
  padding: clamp(60px, 9vw, 120px) var(--pad);
  display: grid; grid-template-columns: minmax(120px, 1fr) 3fr; gap: 32px;
  border-top: 1px solid var(--line);
  margin: 0 var(--pad); padding-left: 0; padding-right: 0;
}
.about__lead {
  margin: 0 0 36px;
  font: 400 clamp(24px, 3vw, 38px)/1.4 var(--serif);
  color: var(--white); letter-spacing: .06em;
}
.about__facts { margin: 0 0 40px; display: grid; gap: 14px; }
.about__facts div { display: flex; gap: 28px; }
.about__facts dt { width: 104px; flex: none; color: var(--dim); font-size: 13px; letter-spacing: .2em; }
.about__facts dd { margin: 0; color: var(--text); }
.about__links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 640px; }
.about__links li { border-bottom: 1px solid var(--line); }
.about__links a {
  display: flex; justify-content: space-between; gap: 28px; padding: 16px 0;
  transition: color .2s, padding .3s;
}
.about__links a::after { content: "↗"; color: var(--dim); transition: color .2s; }
.about__links a:hover { color: var(--white); padding-left: 6px; }
.about__links a:hover::after { color: var(--white); }
.about__k { font-size: 12px; letter-spacing: .3em; color: var(--muted); width: 104px; flex: none; }
.about__v { flex: 1; }

/* ---------- contact ---------- */
.contact {
  margin: 0 var(--pad);
  padding: clamp(60px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact h2 { margin-right: -.5em; } /* 抵銷 letter-spacing 尾端空白，讓標題視覺置中 */
.contact__lead {
  margin: 28px auto 40px; max-width: 34em;
  font: 400 clamp(17px, 1.8vw, 22px)/1.8 var(--serif);
  color: var(--white); letter-spacing: .06em;
}
.contact__btn {
  display: inline-block;
  padding: 14px 34px 14px calc(34px + .3em);
  border: 1px solid rgba(242,242,244,.32);
  font-size: 13px; letter-spacing: .3em; color: var(--text);
  transition: color .25s, background-color .25s, border-color .25s;
}
.contact__btn:hover { color: var(--bg); background: var(--white); border-color: var(--white); }

/* ---------- footer ---------- */
.footer {
  padding: 36px var(--pad) 48px;
  text-align: center; font-size: 12px; letter-spacing: .2em; color: var(--dim);
}
.footer p { margin: 0; }

/* ---------- lightbox ---------- */
body.lb-open { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 6, 8, .97);
  display: grid; grid-template-rows: 1fr auto;
  opacity: 0; transition: opacity .25s;
}
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
.lb__stage {
  position: relative; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 56px clamp(12px, 7vw, 110px) 8px;
  touch-action: pan-y pinch-zoom;
}
.lb__img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  transition: opacity .25s, transform .25s;
}
.lb__img.is-swapping { opacity: 0; }
.lb__bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px clamp(16px, 7vw, 110px) max(18px, env(safe-area-inset-bottom));
}
.lb__cap { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.lb__title { font: 400 18px/1.3 var(--serif); color: var(--white); letter-spacing: .06em; }
.lb__loc { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.lb__meta { margin: 0; display: flex; gap: 18px; font-size: 12px; letter-spacing: .14em; color: var(--dim); white-space: nowrap; }
.lb__meta a { color: var(--muted); border-bottom: 1px solid var(--line); }
.lb__meta a:hover { color: var(--white); }
.lb__btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); transition: color .2s, background .2s;
  border-radius: 50%;
}
.lb__btn:hover { color: var(--white); background: rgba(255,255,255,.06); }
.lb__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.lb__close { top: 8px; right: 8px; }
.lb__btn:focus-visible { outline-offset: -6px; }
.lb__prev, .lb__next { top: calc(50% - 40px); }
.lb__prev { left: clamp(4px, 2vw, 32px); }
.lb__next { right: clamp(4px, 2vw, 32px); }

/* ---------- video lightbox ---------- */
.vlb {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 6, 8, .97);
  opacity: 0; transition: opacity .25s;
}
.vlb[hidden] { display: none; }
.vlb.is-open { opacity: 1; }
.vlb:not(.is-open) { pointer-events: none; } /* 淡出時不擋住底下的卡片 */
.vlb__stage {
  --vh: calc(100vh - 56px - 64px);          /* 扣掉頂部關閉鈕與底部圖說 */
  --vh: calc(100svh - 56px - 64px);
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 0 0;
}
.vlb__frame {
  /* 直向 9:16：高度不超過視口，寬度不超過螢幕 */
  width: min(100vw, var(--vh) * 9 / 16, 480px);
  aspect-ratio: 9 / 16;
  background: #000;
  flex: none;
}
.vlb__iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.vlb__cap {
  margin: 0; height: 64px; padding: 14px 18px 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 16px;
  max-width: 100%;
}
@media (max-width: 560px) {
  .vlb__frame { width: min(100vw, var(--vh) * 9 / 16); }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .reels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .reels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel__play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .reel__play svg { width: 18px; height: 18px; }
  .reel .work__title { font-size: 15px; }
}
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
  .hero__cue { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .nav { padding: 14px 18px; }
  .nav.is-solid { padding: 10px 18px; }
  .hero { min-height: 560px; }
  .hero__img { object-position: 50% 50%; }
  .hero__role { letter-spacing: .36em; }
  .lb__stage { padding: 52px 0 4px; }
  .lb__prev, .lb__next { width: 40px; height: 40px; background: rgba(11,11,13,.45); }
  .lb__prev { left: 6px; }
  .lb__next { right: 6px; }
  .lb__bar { flex-direction: column; gap: 8px; padding-left: 18px; padding-right: 18px; }
  .about__lead { font-size: 21px; }
  .contact__lead { font-size: 16.5px; }
  .about__facts dt, .about__k { width: 84px; }
  .about__facts div, .about__links a { gap: 20px; }
}
@media (hover: none) and (max-width: 560px) {
  .work__btn:hover img { transform: none; }
}
