/* 1 design px = 100vw / 1920 */
:root {
  --u: calc(100vw / 1920);
  --bg: #f7f6f3;
  --ink: #111;
  --grid: #dfded9;
  --cross: #b9b8b1;
  --zh: "Noto Sans TC", sans-serif;
  --en: "Inter", sans-serif;
  --serif: "Bodoni Moda", serif;
  --ease: cubic-bezier(.77, 0, .18, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; background: var(--bg); color: var(--ink); font-family: var(--zh); -webkit-font-smoothing: antialiased; }
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
img { display: block; }

/* text reveal mask */
.reveal { display: block; overflow: hidden; }
.reveal > span { display: inline-block; will-change: transform; }
.reveal > .chars .ch { display: inline-block; will-change: transform; transform-origin: 0 100%; }
.hero__services b { display: inline-block; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 50; background: var(--bg); pointer-events: none; } /* same colour as the hero */
.loader__brand {
  position: absolute; top: calc(50 * var(--u)); left: 0; right: 0; text-align: center; overflow: hidden;
  font: 700 calc(20 * var(--u)) / calc(19 * var(--u)) var(--en); letter-spacing: calc(1 * var(--u));
}
.loader__brand span { display: inline-block; }
.loader__frame {
  position: fixed; overflow: hidden; background: #ccc;
  left: 50%; top: 50%;
  width: calc(320 * var(--u)); height: calc(213 * var(--u));
  transform: translate(-50%, -50%);
  clip-path: inset(50% 0 50% 0);
}
.loader__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.loader__frame img.is-hero { height: 112.53%; top: -7.72%; } /* same crop as Figma hero */
.loader__meta {
  position: absolute; left: calc(30 * var(--u)); right: calc(30 * var(--u)); bottom: calc(50 * var(--u));
  display: flex; justify-content: space-between; align-items: flex-end;
}
.loader__label { font: italic 700 calc(22 * var(--u)) / 1 var(--serif); }
.loader__count { font: 500 calc(120 * var(--u)) / .8 var(--en); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--grid); }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }

/* ---------- Header ---------- */
.header {
  position: absolute; z-index: 2; top: calc(50 * var(--u)); left: calc(30 * var(--u)); right: calc(30 * var(--u));
  display: flex; justify-content: space-between; align-items: center; height: calc(19 * var(--u));
}
.header__contact { display: flex; align-items: center; gap: calc(15 * var(--u)); font: 500 calc(18 * var(--u)) / calc(15 * var(--u)) var(--zh); letter-spacing: calc(.9 * var(--u)); }
.header__contact img { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.header__brand { position: absolute; left: 50%; transform: translateX(-50%); font: 700 calc(20 * var(--u)) / calc(19 * var(--u)) var(--en); letter-spacing: calc(1 * var(--u)); white-space: nowrap; }
.header__menu { display: flex; align-items: center; gap: calc(14 * var(--u)); font: 500 calc(18 * var(--u)) / calc(15 * var(--u)) var(--en); text-transform: uppercase; }
.header__menu img { width: calc(46 * var(--u)); height: calc(5 * var(--u)); }
.header img, .hero__info .line { transform-origin: left; }

/* ---------- Hero ---------- */
.hero { position: relative; height: calc(1609 * var(--u)); }
.hero__grid { position: absolute; left: 0; top: 0; width: 100%; height: calc(576 * var(--u)); pointer-events: none; }
.hero__grid i { position: absolute; background: var(--grid); }
.hero__grid .v { left: calc(var(--x) * var(--u)); top: 0; width: 1px; height: 100%; transform-origin: top; }
.hero__grid .h { top: calc(var(--y) * var(--u)); left: 0; height: 1px; width: 100%; transform-origin: left; }
.hero__grid .c { left: calc((var(--x) - 6) * var(--u)); top: calc((var(--y) - 6) * var(--u)); width: calc(13 * var(--u)); height: calc(13 * var(--u)); background: none; }
.hero__grid .c::before, .hero__grid .c::after { content: ""; position: absolute; background: var(--cross); }
.hero__grid .c::before { left: 0; right: 0; top: 50%; height: 1px; }
.hero__grid .c::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.hero__intro { position: absolute; left: calc(155 * var(--u)); top: calc(275 * var(--u)); width: calc(720 * var(--u)); }
.hero__title { font: 700 55px / 1.2 var(--zh); color: #000; white-space: nowrap; }
.hero__lead { margin-top: calc(21 * var(--u)); font: 400 calc(18 * var(--u)) / calc(27 * var(--u)) var(--zh); letter-spacing: calc(1 * var(--u)); color: rgba(0, 0, 0, .8); white-space: nowrap; }

.hero__services { position: absolute; left: calc(1497 * var(--u)); top: calc(316 * var(--u)); width: calc(268 * var(--u)); list-style: none; display: flex; flex-direction: column; gap: calc(16 * var(--u)); }
.hero__services li > .reveal > span { display: flex; align-items: center; gap: calc(20 * var(--u)); }
.hero__services b { font: 500 calc(22 * var(--u)) / calc(26 * var(--u)) var(--zh); color: #000; white-space: nowrap; }
.hero__services em { font: 500 calc(17 * var(--u)) / calc(15 * var(--u)) var(--en); font-style: normal; color: #3f3f3f; width: calc(152 * var(--u)); white-space: nowrap; }

/* ---------- Cases (pinned hero) ---------- */
.hero { height: calc(576 * var(--u)); position: relative; z-index: 1; transform-origin: 50% 100%; background: var(--bg); }
.pin-wrap { position: relative; z-index: 3; height: max(100vh, calc(950 * var(--u))); }
.cases { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; height: 100vh; overflow: hidden; color: #fff; }
.cases__media, .case-img { position: absolute; inset: 0; overflow: hidden; }
.cases__media { z-index: 0; isolation: isolate; }
.case-img { visibility: hidden; }
.case-img.is-active { visibility: visible; }
.case-img img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.case-img img.is-hero { top: -7.72%; height: 112.53%; } /* Figma crop */
.cases__texts, .cases__counter, .cases__scroll { text-shadow: 0 1px 14px rgba(0, 0, 0, .3); } /* keeps white text legible over light parts of the lighter overlay */
.cases__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 55%), rgba(0, 0, 0, .18); pointer-events: none; }

.cases__counter { position: absolute; top: calc(40 * var(--u)); right: calc(30 * var(--u)); display: flex; gap: calc(8 * var(--u)); font: 500 calc(18 * var(--u)) / calc(22 * var(--u)) var(--en); letter-spacing: calc(1 * var(--u)); }
.cases__num { display: inline-block; }

.case-text { position: absolute; inset: 0; pointer-events: none; }
.case-text.is-active { pointer-events: auto; }
.case-info { position: absolute; left: calc(30 * var(--u)); right: calc(30 * var(--u)); top: calc(50% - 15 * var(--u)); height: calc(30 * var(--u)); display: flex; font: 500 calc(24 * var(--u)) / calc(26 * var(--u)) var(--zh); white-space: nowrap; }
.case-info .col { display: flex; align-items: center; }
.case-info .c1 { width: calc(620 * var(--u)); letter-spacing: calc(2.4 * var(--u)); }
.case-info .c2 { width: calc(620 * var(--u)); }
.case-info .c3 { flex: 1; min-width: 0; font-family: var(--en); } /* takes the remaining width so its line runs up to the link, like the other columns */
.case-info .c4 { flex: 0 0 auto; justify-content: flex-end; }
.case-info .c4 a { text-decoration: underline; text-underline-offset: .15em; }
.case-info .line { flex: 1; min-width: 0; height: 1px; opacity: .45; margin: 0 calc(37 * var(--u)) 0 calc(21 * var(--u)); transform-origin: left; }
.case-info .c3 .line { margin-left: calc(51 * var(--u)); }

.case-desc { position: absolute; left: calc(30 * var(--u)); bottom: calc(87 * var(--u)); font: 400 calc(18 * var(--u)) / calc(33 * var(--u)) var(--zh); white-space: nowrap; }

.cases__scroll { position: absolute; right: calc(30 * var(--u)); bottom: calc(87 * var(--u)); width: calc(144 * var(--u)); font: italic 400 calc(22 * var(--u)) / calc(28 * var(--u)) var(--serif); }
.cases__scroll .reveal > span { display: flex; justify-content: space-between; width: 100%; }
.cases__scroll i { font-style: italic; }
.cases__scroll b { font-weight: 700; }
.cases__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .2); }
.cases__progress span { display: block; height: 100%; background: #fff; transform: scaleX(.2); transform-origin: left; }

.after { height: 100vh; }

/* split layer: two halves of the last case image that slide apart */
.cases__split { position: absolute; inset: 0; visibility: hidden; pointer-events: none; z-index: 1; }
.split { position: absolute; inset: 0; overflow: hidden; } /* both halves are full-size copies; clip-path shows one side each */
.split__img { position: absolute; inset: 0; overflow: hidden; }
.split__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 55%), rgba(0, 0, 0, .18); }
.cases__texts, .cases__counter, .cases__scroll, .cases__progress { z-index: 2; }
.cases__texts { position: absolute; inset: 0; }

/* ---------- 02 / The Studio ---------- */
.studio { box-shadow: 0 calc(40 * var(--u)) calc(80 * var(--u)) rgba(0, 0, 0, .28); position: absolute; left: 0; top: 0; width: 100%; height: max(100vh, calc(950 * var(--u))); z-index: 1; overflow: hidden; background: var(--bg); color: #161614; }
.studio__drawing { position: absolute; left: 0; top: 0; width: 100%; height: calc(950 * var(--u)); mix-blend-mode: multiply; opacity: .28; pointer-events: none; }
.studio__drawing img { width: 100%; height: 100%; object-fit: cover; opacity: .6; }

.studio__label { position: absolute; left: calc(30 * var(--u)); top: calc(362 * var(--u)); width: calc(144 * var(--u)); font: italic 400 calc(22 * var(--u)) / calc(28 * var(--u)) var(--serif); color: #000; }
.studio__label .reveal > span { display: flex; justify-content: space-between; width: 100%; }
.studio__label i { font-style: italic; }
.studio__label b { font-weight: 700; }

.studio__copy { position: absolute; left: calc(295 * var(--u)); top: calc(177 * var(--u)); width: calc(640 * var(--u)); }
.studio__title { font: 700 calc(55 * var(--u)) / calc(88 * var(--u)) var(--zh); white-space: nowrap; }
.studio__text { margin-top: calc(30 * var(--u)); display: flex; flex-direction: column; gap: calc(20 * var(--u)); width: calc(440 * var(--u)); font: 400 calc(18 * var(--u)) / calc(32 * var(--u)) var(--zh); color: rgba(0, 0, 0, .8); white-space: nowrap; }

.studio__cta { position: absolute; left: calc(295 * var(--u)); top: calc(577 * var(--u)); display: flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(15 * var(--u)) calc(40 * var(--u)); border-radius: calc(5 * var(--u)); background: #141414; color: #fff; font: 400 calc(16 * var(--u)) / calc(24 * var(--u)) var(--zh); letter-spacing: calc(.8 * var(--u)); white-space: nowrap; transition: background .3s; }
.studio__cta:hover { background: #3a3a37; }
.studio__cta img { width: calc(18 * var(--u)); height: calc(18 * var(--u)); transition: transform .3s; }
.studio__cta:hover img { transform: translate(2px, -2px); }

.studio__values { position: absolute; left: calc(155 * var(--u)); top: calc(715 * var(--u)); width: calc(548 * var(--u)); list-style: none; }
.studio__values li { position: relative; height: calc(45 * var(--u)); display: flex; align-items: center; justify-content: flex-end; font: 500 calc(22 * var(--u)) / calc(24 * var(--u)) var(--zh); white-space: nowrap; }
.studio__values li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #b9b8b4; transform: scaleX(var(--line, 1)); transform-origin: left; }

.studio__photo { position: absolute; left: calc(1181 * var(--u)); top: calc(130 * var(--u)); width: calc(584 * var(--u)); height: calc(720 * var(--u)); overflow: hidden; }
.studio__photo img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; } /* object-fit keeps the photo's own proportions at any frame size */


/* initial (pre-animation) states, only when JS runs */
.js .cases { opacity: 0; } /* opacity, not visibility: children with visibility:visible would still show */

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .js .cases { opacity: 1; }
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
/* no overflow:hidden on .lenis-stopped: it toggled the scrollbar on every case switch */

/* studio entrance helpers */
.studio__title .ch { display: inline-block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.studio__title .ch > span { display: inline-block; will-change: transform; }
.studio__title .reveal { overflow: visible; }
.studio__photo img { z-index: 1; }

/* ---------- 03 / Selected Project ---------- */
.selected { position: relative; z-index: 2; height: 100vh; color: #fff; } /* transparent: the works section sits underneath */
.selected__split { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.ssplit { position: absolute; inset: 0; overflow: hidden; }
.ssplit img { position: absolute; left: -2%; top: -10%; width: 104%; height: 120%; max-width: none; object-fit: cover; }
.ssplit i { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.selected__inner { position: absolute; inset: 0; will-change: transform; }
.selected__veil { position: absolute; inset: 0; background: #0d0d0c; pointer-events: none; }
.selected__media { position: absolute; inset: 0; overflow: hidden; }
.selected__media img { position: absolute; left: -2%; top: -10%; width: 104%; height: 120%; object-fit: cover; will-change: transform; }
.selected__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.selected__info { position: absolute; left: calc(30 * var(--u)); right: calc(30 * var(--u)); top: calc(50% - 30 * var(--u)); height: calc(60 * var(--u)); display: flex; align-items: center; justify-content: space-between; white-space: nowrap; }
.selected__year { font: 400 calc(20 * var(--u)) / calc(28 * var(--u)) var(--en); }
.selected__name { position: relative; width: calc(620 * var(--u)); height: 100%; display: flex; align-items: center; justify-content: center; }
.selected__br { position: absolute; top: 50%; font: italic 400 calc(34 * var(--u)) / calc(44 * var(--u)) var(--serif); transform: translateY(-50%); }
.selected__br--l { left: 0; }
.selected__br--r { right: 0; }
.selected__titles { display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--u)); }
.selected__en { font: italic 400 calc(27 * var(--u)) / calc(34 * var(--u)) var(--serif); }
.selected__zh { font: 400 calc(18 * var(--u)) / calc(22 * var(--u)) var(--zh); }
.selected__link { font: 400 calc(18 * var(--u)) / calc(28 * var(--u)) var(--zh); }
.selected__link .reveal > span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.selected__link:hover .reveal > span { background-size: 100% 1px; }

/* ---------- 04 / Works Archive ---------- */
/* pulled up under 03 (its 100vh + 100vh split pin) so the split reveals it in place;
   content starts 130vh down: the first screen belongs to the 3D logo's entrance */
.works { overflow: clip; /* keep the sticky backdrop from spilling over the footer (clip, not hidden: sticky still works) */ --off: 200; position: relative; z-index: 1; margin-top: -240vh; height: calc((5850 + var(--off)) * var(--u) + 170vh); background: var(--bg); color: #1f1f1f; }
/* fixed backdrop: a sticky 100vh layer that stays behind the content for the whole section */
.works__bg { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; overflow: hidden; background: var(--bg); } /* grid + 3D logo stay fixed behind the archive */
.works__bg canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; } /* transparent, drawn over the grid */
.works__content { position: absolute; left: 0; right: 0; top: 170vh; height: calc((5850 + var(--off)) * var(--u)); }
.works__grid { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.works__grid i { position: absolute; background: #dfded9; }
.works__grid .v { left: calc(var(--x) * var(--u)); top: 0; width: 1px; height: 100%; }
.works__grid .h { top: calc(var(--y) * var(--u)); left: 0; width: 100%; height: 1px; }
.works__grid .c { left: calc((var(--x) - 4) * var(--u)); top: calc((var(--y) - 4) * var(--u)); width: calc(9 * var(--u)); height: calc(9 * var(--u)); background: none; }
.works__grid .c::before, .works__grid .c::after { content: ""; position: absolute; background: #b9b8b1; }
.works__grid .c::before { left: 0; right: 0; top: 50%; height: 1px; }
.works__grid .c::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.works__progress { position: absolute; left: calc(959 * var(--u)); top: 0; width: 1px; height: calc((5630 + var(--off)) * var(--u)); background: #1f1f1f; transform-origin: top; transform: scaleY(0); }

.works__head { position: absolute; left: calc(448 * var(--u)); top: calc(121 * var(--u)); width: calc(440 * var(--u)); display: flex; flex-direction: column; gap: calc(60 * var(--u)); }
.works__headrow { display: flex; align-items: center; gap: calc(29 * var(--u)); }
.works__title { width: calc(223 * var(--u)); font: 700 calc(55 * var(--u)) / 1.2 var(--zh); white-space: nowrap; }
.works__label { width: calc(144 * var(--u)); font: italic 400 calc(22 * var(--u)) / calc(28 * var(--u)) var(--serif); color: #000; white-space: nowrap; }
.works__label .reveal > span { display: flex; justify-content: space-between; width: 100%; }
.works__label i { font-style: italic; }
.works__label b { font-weight: 700; }
.works__intro { display: flex; flex-direction: column; gap: calc(15 * var(--u)); }
.works__lead { font: 500 calc(22 * var(--u)) / calc(30 * var(--u)) var(--zh); white-space: nowrap; }
.works__text { font: 400 calc(18 * var(--u)) / calc(32 * var(--u)) var(--zh); color: rgba(0, 0, 0, .8); white-space: nowrap; } /* same as About copy */
.works__note { font: 400 calc(14 * var(--u)) / calc(19 * var(--u)) var(--zh); white-space: nowrap; }

.work { position: absolute; left: calc(var(--x) * var(--u)); top: calc((var(--y) + var(--off)) * var(--u)); width: calc(690 * var(--u)); display: flex; flex-direction: column; gap: calc(16 * var(--u)); }
.imgBox { display: block; overflow: hidden; }
.imgBox img { width: 100%; height: 100%; object-fit: cover; will-change: transform, filter; }
.work__img { height: calc(450 * var(--u)); }
.work__cap { display: flex; flex-direction: column; gap: calc(16 * var(--u)); }
.work__name { display: flex; justify-content: space-between; align-items: center; font: 500 calc(24 * var(--u)) / calc(32 * var(--u)) var(--zh); white-space: nowrap; }
.work__arrow { font: 400 calc(26 * var(--u)) / calc(35 * var(--u)) var(--en); transition: transform .4s var(--ease); }
.work:hover .work__arrow { transform: translate(4px, -4px); }
.work__en { font: 400 calc(16 * var(--u)) / calc(22 * var(--u)) var(--en); letter-spacing: .04em; white-space: nowrap; }
.work-thumb { position: absolute; left: calc(var(--x) * var(--u)); top: calc((var(--y) + var(--off)) * var(--u)); width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
.work-link { position: absolute; left: calc(var(--x) * var(--u)); top: calc((var(--y) + var(--off)) * var(--u)); width: calc(45 * var(--u)); height: 1px; background: #999691; }
.work-link--l { transform-origin: left; }
.work-link--r { transform-origin: right; }
.work-year { position: absolute; left: calc(960 * var(--u)); top: calc((var(--y) + var(--off) - 38.5) * var(--u)); transform: translateX(-50%); padding: calc(4 * var(--u)) calc(15 * var(--u)); font: 400 calc(44 * var(--u)) / calc(59 * var(--u)) var(--en); white-space: nowrap; }
.work-dot { position: absolute; left: calc(956 * var(--u)); top: calc((var(--y) + var(--off) + 47) * var(--u)); width: calc(8 * var(--u)); height: calc(8 * var(--u)); background: #404040; }

/* works CTA */
.works__cta { position: absolute; left: 50%; top: calc((5678 + var(--off)) * var(--u)); transform: translateX(-50%); display: flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(15 * var(--u)) calc(40 * var(--u)); border-radius: calc(5 * var(--u)); background: #141414; color: #fff; font: 400 calc(16 * var(--u)) / calc(24 * var(--u)) var(--zh); letter-spacing: calc(.8 * var(--u)); white-space: nowrap; transition: background .3s; }
.works__cta:hover { background: #3a3a37; }
.works__cta img { width: calc(18 * var(--u)); height: calc(18 * var(--u)); transition: transform .3s; }
.works__cta:hover img { transform: translate(2px, -2px); }

/* ---------- 05 / Footer ---------- */
.footer { position: relative; z-index: 0; background: #080808; min-height: 100vh; } /* sits under the archive (z 1), uncovered as it lifts */
.footer__inner { will-change: transform; min-height: 100vh; display: flex; flex-direction: column; }
.footer__top { position: relative; z-index: 1; flex: 1; justify-content: space-between; background: #fff; padding: calc(200 * var(--u)) calc(30 * var(--u)) calc(70 * var(--u)); display: flex; flex-direction: column; gap: calc(115 * var(--u)); }
.footer__row { display: flex; align-items: flex-start; }
.footer__invite { width: calc(930 * var(--u)); display: flex; flex-direction: column; gap: calc(12 * var(--u)); white-space: nowrap; }
.footer__hello { font: 500 calc(48 * var(--u)) / calc(62 * var(--u)) var(--en); color: #c4c9c6; }
.footer__contact { position: relative; align-self: flex-start; font: 500 calc(50 * var(--u)) / calc(65 * var(--u)) var(--en); color: #111; }
.footer__uline { position: absolute; left: 0; right: 0; bottom: calc(4 * var(--u)); height: calc(3 * var(--u)); background: currentColor; transform-origin: left; }
.footer__contact:hover .footer__uline { animation: uline .8s var(--ease); }
@keyframes uline { 0% { transform: scaleX(1); transform-origin: right; } 45% { transform: scaleX(0); transform-origin: right; } 46% { transform-origin: left; } 100% { transform: scaleX(1); transform-origin: left; } }
.footer__zh { font: 400 calc(18 * var(--u)) / calc(23 * var(--u)) var(--zh); color: #555; }
.footer__nav { width: calc(460 * var(--u)); display: flex; flex-direction: column; gap: calc(9 * var(--u)); font: 500 calc(22 * var(--u)) / calc(29 * var(--u)) var(--en); color: #111; }
.footer__nav a { align-self: flex-start; }
.footer__nav a .reveal > span, .footer__book .reveal > span, .footer__social a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.footer__nav a:hover .reveal > span, .footer__book:hover .reveal > span, .footer__social a:hover { background-size: 100% 1px; }
.footer__services { width: calc(470 * var(--u)); display: flex; flex-direction: column; gap: calc(22 * var(--u)); font: 400 calc(18 * var(--u)) / calc(23 * var(--u)) var(--zh); color: #111; }
.footer__services ul { list-style: none; display: flex; flex-direction: column; gap: calc(5 * var(--u)); }
.footer__book { align-self: flex-start; }
.footer__news { width: calc(930 * var(--u)); display: flex; align-items: flex-start; gap: calc(125 * var(--u)); font: 500 calc(18 * var(--u)) / calc(23 * var(--u)) var(--en); color: #111; white-space: nowrap; }
.footer__field { position: relative; width: calc(330 * var(--u)); display: flex; justify-content: space-between; padding-bottom: calc(8 * var(--u)); }
.footer__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 calc(18 * var(--u)) / calc(23 * var(--u)) var(--en); color: #111; }
.footer__field input::placeholder { color: #111; }
.footer__field button { font: 400 calc(20 * var(--u)) / calc(26 * var(--u)) var(--en); color: #111; transition: transform .3s; }
.footer__field button:hover { transform: translate(2px, -2px); }
.footer__fline { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #777; transform-origin: left; }
.footer__field:focus-within .footer__fline { background: #111; }
.footer__totop { width: calc(460 * var(--u)); text-align: left; font: 400 calc(18 * var(--u)) / calc(23 * var(--u)) var(--en); color: #adb5b0; transition: color .3s; }
.footer__totop:hover { color: #111; }
.footer__social { width: calc(470 * var(--u)); font: 400 calc(18 * var(--u)) / calc(23 * var(--u)) var(--en); color: #111; white-space: nowrap; }
.footer__brand { position: relative; z-index: 0; height: calc(300 * var(--u)); padding: calc(10 * var(--u)) calc(24 * var(--u)) calc(24 * var(--u)); display: flex; flex-direction: column; justify-content: flex-end; gap: calc(22 * var(--u)); background: #080808; color: #fff; white-space: nowrap; }
.footer__mark { font: 700 calc(20 * var(--u)) / calc(19 * var(--u)) var(--en); letter-spacing: calc(1 * var(--u)); }
.footer__legal { display: flex; justify-content: space-between; align-items: flex-end; font: 400 calc(15 * var(--u)) / calc(20 * var(--u)) var(--en); color: #929292; }
.footer__legal a:hover { color: #fff; }

/* footer entrance helpers */
.footer__hello .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.footer__hello .w > span { display: inline-block; }
.footer__hello .reveal { overflow: visible; }

/* ---------- Sticky header (after scroll) ---------- */
.sbar { position: fixed; z-index: 60; top: 18px; left: 50%; display: flex; align-items: center; gap: 14px; padding: 6px 6px 6px 22px; border-radius: 999px; background: rgba(17, 17, 16, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; transform: translate(-50%, -160%); transition: transform .7s cubic-bezier(.77, 0, .18, 1); }
.sbar.is-shown, .sbar.is-open { transform: translate(-50%, 0); }
.sbar__logo { font: 700 15px/1 var(--en); letter-spacing: .06em; white-space: nowrap; }
.sbar__logo sup { font-size: .55em; margin-left: 1px; }
.sbar__tag { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; font: 400 10px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .16em; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.sbar__tag i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: sbarDot 1.6s ease-in-out infinite; }
@keyframes sbarDot { 50% { opacity: .2; } }
.sbar__menu { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-content: center; gap: 4px; transition: transform .4s; }
.sbar__menu:hover { transform: scale(1.06); }
.sbar__menu span { display: block; width: 16px; height: 1px; background: #111; transition: transform .45s cubic-bezier(.77, 0, .18, 1), opacity .3s; }
.sbar.is-open .sbar__menu span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.sbar.is-open .sbar__menu span:nth-child(2) { opacity: 0; }
.sbar.is-open .sbar__menu span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.smenu { position: fixed; z-index: 55; inset: 0; background: #fff; color: #1d1d1d; pointer-events: none; visibility: hidden; clip-path: inset(50% 50% 50% 50%); }
.smenu.is-open { pointer-events: auto; visibility: visible; }
.smenu__links { position: absolute; z-index: 1; left: 8vw; top: 50%; transform: translateY(-55%); list-style: none; }
.smenu__links a { display: block; font: 400 clamp(48px, 5.9vw, 96px)/.9 "Inter", var(--en); letter-spacing: -.03em; text-transform: uppercase; transition: opacity .4s, color .4s; }
.smenu__links .reveal { overflow: hidden; padding-bottom: .04em; transition: translate .6s cubic-bezier(.77, 0, .18, 1); } /* hover shift lives on the mask */
.smenu__links .reveal > span { display: inline-flex; align-items: flex-start; gap: .25em; } /* no CSS transition here: GSAP animates this element's transform */
.smenu__links em { font: 400 .2em/1 var(--zh); font-style: normal; letter-spacing: .08em; color: #8a8a8a; margin-top: .5em; opacity: 0; transform: translateX(-.4em); transition: opacity .4s, transform .5s cubic-bezier(.77, 0, .18, 1); }
.smenu__links:hover a { opacity: .28; }
.smenu__links a:hover { opacity: 1; color: #000; }
.smenu__links a:hover .reveal { translate: .18em 0; }
.smenu__links a:hover em { opacity: 1; transform: none; }
.smenu__foot { position: absolute; z-index: 1; left: 10px; right: calc(46vw + 24px); bottom: 22px; display: grid; grid-template-columns: calc(8vw - 10px) 1fr auto; align-items: end; font: 400 clamp(14px, 1.25vw, 18px)/1.6 "Inter", var(--en); color: #8a8a8a; }
.smenu__foot ul { list-style: none; }
.smenu__foot > p, .smenu__foot > ul { font-size: clamp(12px, .85vw, 14px); line-height: 1.7; } /* ©, contact details and social links share one small size */
.smenu__foot > ul:last-child { display: flex; gap: 28px; }
/* right side of the menu: two image columns that drift in opposite directions; the right column is cut by the screen edge */
.smenu__media { position: absolute; top: 0; bottom: 0; left: 54vw; right: 0; display: flex; gap: 3vw; padding-left: 3vw; overflow: hidden; pointer-events: none; }
.smenu__col { flex: 0 0 22vw; height: 100%; overflow: hidden; }
.smenu__track { will-change: transform; }
.smenu__track figure { padding-bottom: 3vw; } /* padding (not gap) keeps the doubled list's half-height exactly one loop */
.smenu__track figure > div, .smenu__track img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #ecebe7; }
@media (max-width: 560px) { .sbar__tag { display: none; } }

/* top header: give the masked labels room so CJK glyphs aren't clipped */
.header .reveal { line-height: 1.4; padding: .1em 0; margin: -.1em 0; }

/* top header MENU hover: the label slides left out of its mask while a copy slides in from the
   right (clip by the .reveal mask), and the two lines wipe shorter toward the left (clip-path) */
.header__menu { cursor: pointer; }
.header__menu .mtxt, .header__contact .mtxt { position: relative; display: inline-block; transition: transform .6s cubic-bezier(.77, 0, .18, 1); }
.header__menu .mtxt::after, .header__contact .mtxt::after { content: attr(data-t); position: absolute; left: calc(100% + .6em); top: 0; }
.header__menu:hover .mtxt, .header__contact:hover .mtxt { transform: translateX(calc(-100% - .6em)); }
.header__menu img, .header__contact img { clip-path: inset(0 0 0 0); transition: clip-path .6s cubic-bezier(.77, 0, .18, 1); }
.header__menu:hover img { clip-path: inset(0 40% 0 0); }
/* contact arrow: on hover it wipes out to the right and wipes back in from the left, once */
.header__contact:hover img { animation: arrowWipe .7s cubic-bezier(.77, 0, .18, 1); }
@keyframes arrowWipe { 0% { clip-path: inset(0 0 0 0); } 45% { clip-path: inset(0 0 0 100%); } 46% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0 0 0); } }

/* =====================================================================
   RWD — phones & tablets (≤ 1024px): reading-first, normal flow,
   no pinned scroll effects; hero becomes a swipe / autoplay carousel.
   ===================================================================== */
@media (max-width: 1024px) {
  /* loader */
  .loader__brand { top: 24px; font-size: 13px; line-height: 1.2; letter-spacing: .08em; }
  .loader__frame { width: 62vw; height: 41vw; }
  .loader__meta { left: 20px; right: 20px; bottom: 28px; }
  .loader__label { font-size: 15px; }
  .loader__count { font-size: 64px; }

  /* top header */
  .header { top: 22px; left: 20px; right: 20px; height: auto; }
  .header__contact { display: none; }
  .header__brand { position: static; transform: none; font-size: 14px; line-height: 1.3; letter-spacing: .06em; }
  .header__menu { gap: 10px; font-size: 13px; line-height: 1.3; }
  .header__menu img { width: 30px; height: 4px; }

  /* hero intro */
  .hero { height: auto; padding: 104px 20px 44px; }
  .hero__grid { display: none; }
  .hero__intro { position: static; width: auto; }
  .hero__title { font-size: clamp(30px, 9.2vw, 44px); line-height: 1.3; white-space: normal; }
  .hero__lead { margin-top: 18px; font-size: 15px; line-height: 1.85; letter-spacing: .02em; white-space: normal; }
  .hero__lead .reveal { display: inline; }
  .hero__services { position: static; width: auto; margin-top: 30px; gap: 10px; }
  .hero__services li > .reveal > span { gap: 14px; }
  .hero__services b { font-size: 16px; line-height: 1.5; }
  .hero__services em { width: auto; font-size: 11px; line-height: 1.5; letter-spacing: .1em; }

  /* hero carousel */
  .pin-wrap { height: auto; }
  .cases { position: relative; height: 78svh; min-height: 500px; max-height: 760px; }
  .cases__split { display: none; }
  .cases__counter { top: 20px; right: 20px; font-size: 12px; line-height: 1.4; gap: 6px; }
  .cases__scroll { display: none; }
  .case-info { top: auto; bottom: 168px; left: 20px; right: 20px; height: auto; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; line-height: 1.5; white-space: normal; }
  .case-info .col { width: auto !important; }
  .case-info .c1 { letter-spacing: .12em; opacity: .75; font-size: 12px; }
  .case-info .c2 { font-size: 24px; line-height: 1.35; font-weight: 500; }
  .case-info .c3 { font-size: 13px; opacity: .8; }
  .case-info .c4 { display: none; }
  .case-info .line { display: none; }
  .case-desc { left: 20px; right: 20px; bottom: 40px; font-size: 14px; line-height: 1.8; white-space: normal; }
  .cases__progress { height: 2px; }

  /* 02 studio */
  .studio { position: relative; height: auto; padding: 72px 20px 80px; display: flex; flex-direction: column; gap: 28px; box-shadow: none; }
  .studio__drawing { display: none; }
  .studio__label, .studio__copy, .studio__cta, .studio__values, .studio__photo { position: static; left: auto; top: auto; width: auto; }
  .studio__label { width: 118px; font-size: 16px; line-height: 1.4; order: 1; }
  .studio__copy { order: 2; }
  .studio__title { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.4; white-space: normal; }
  .studio__title .ch { padding-bottom: 0; margin-bottom: 0; }
  .studio__text { margin-top: 18px; width: auto; gap: 16px; font-size: 15px; line-height: 1.85; white-space: normal; }
  .studio__cta { order: 3; align-self: flex-start; padding: 12px 26px; gap: 10px; border-radius: 4px; font-size: 14px; line-height: 1.5; letter-spacing: .05em; }
  .studio__cta img { width: 16px; height: 16px; }
  .studio__photo { order: 4; height: auto; aspect-ratio: 4 / 5; width: 100%; }
  .studio__values { order: 5; width: 100%; }
  .studio__values li { height: 46px; font-size: 16px; line-height: 1.4; }

  /* 03 selected */
  .selected { height: 72svh; min-height: 460px; }
  .selected__split { display: none; }
  .selected__info { top: auto; bottom: 44px; left: 20px; right: 20px; height: auto; flex-direction: column; align-items: center; gap: 16px; }
  .selected__year { font-size: 13px; line-height: 1.4; letter-spacing: .1em; }
  .selected__name { width: 100%; height: 72px; }
  .selected__br { font-size: 26px; line-height: 1; }
  .selected__en { font-size: 20px; line-height: 1.3; }
  .selected__zh { font-size: 13px; line-height: 1.5; }
  .selected__link { font-size: 14px; line-height: 1.5; }

  /* 04 works: single readable column, years as headings */
  .works { margin-top: 0; height: auto; padding-bottom: 72px; }
  .works__grid, .works__progress, .work-thumb, .work-link, .work-dot { display: none; }
  .works__content { position: relative; top: 0; height: auto; padding: 80px 20px 0; display: flex; flex-direction: column; gap: 20px; }
  .works__head { position: static; width: auto; gap: 24px; order: 0; margin-bottom: 28px; }
  .works__headrow { gap: 16px; flex-wrap: wrap; }
  .works__title { width: auto; font-size: clamp(30px, 8.4vw, 40px); }
  .works__label { width: 112px; font-size: 15px; line-height: 1.4; }
  .works__intro { gap: 12px; }
  .works__lead { font-size: 18px; line-height: 1.5; white-space: normal; }
  .works__text { font-size: 15px; line-height: 1.85; white-space: normal; }
  .works__text .reveal { display: inline; }
  .work { position: static; left: auto; top: auto; width: 100%; gap: 12px; order: var(--y); margin-bottom: 36px; }
  .work__img { height: auto; aspect-ratio: 3 / 2; }
  .work__cap { gap: 6px; }
  .work__name { font-size: 18px; line-height: 1.5; }
  .work__arrow { font-size: 20px; line-height: 1; }
  .work__en { font-size: 12px; line-height: 1.5; letter-spacing: .08em; white-space: normal; }
  .work-year { position: static; left: auto; top: auto; transform: none; padding: 0; order: calc(var(--y) - 300); font-size: 28px; line-height: 1.2; color: #8a877f; }
  .works__cta { position: static; left: auto; top: auto; transform: none; order: 99999; align-self: center; padding: 12px 28px; gap: 10px; border-radius: 4px; font-size: 14px; line-height: 1.5; }
  .works__cta img { width: 16px; height: 16px; }

  /* 05 footer */
  .footer, .footer__inner { min-height: 0; }
  .footer__top { padding: 72px 20px 36px; gap: 48px; justify-content: flex-start; }
  .footer__row { flex-direction: column; gap: 36px; }
  .footer__invite, .footer__nav, .footer__services, .footer__news, .footer__totop, .footer__social { width: auto; }
  .footer__invite { gap: 10px; white-space: normal; }
  .footer__hello { font-size: 26px; line-height: 1.3; }
  .footer__contact { font-size: 32px; line-height: 1.3; }
  .footer__uline { height: 2px; bottom: 2px; }
  .footer__zh { font-size: 14px; line-height: 1.6; }
  .footer__nav { gap: 8px; font-size: 18px; line-height: 1.5; }
  .footer__services { gap: 16px; font-size: 15px; line-height: 1.6; }
  .footer__services ul { gap: 4px; }
  .footer__news { flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.5; }
  .footer__field { width: 100%; padding-bottom: 8px; }
  .footer__field input { font-size: 16px; line-height: 1.5; }
  .footer__field button { font-size: 18px; line-height: 1; }
  .footer__totop, .footer__social { font-size: 15px; line-height: 1.5; }
  .footer__brand { height: auto; padding: 32px 20px 24px; gap: 14px; }
  .footer__mark { font-size: 16px; line-height: 1.3; }
  .footer__legal { flex-wrap: wrap; justify-content: flex-start; gap: 8px 20px; font-size: 12px; line-height: 1.5; }

  /* floating bar + menu */
  .sbar { top: 12px; }
  .smenu__links { left: 24px; right: 24px; }
  .smenu__media { display: none; }
  .smenu__links a { font-size: clamp(40px, 12.5vw, 64px); }
  .smenu__foot { left: 24px; right: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 13px; }
}
