:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --ink: #27382c;
  --muted: #546259;
  --secondary: #e8e9e5;
  --olive: #40513d;
  --white: #fff;
  --side: clamp(22px, 5.55vw, 100px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --text: Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --body: clamp(1rem, .94rem + .26vw, 1.125rem);
  --section: clamp(2rem, 4vw, 3.7rem);
  --display: clamp(3.2rem, 5.65vw, 6.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body)/1.65 var(--text); }
body:has(.viewer[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid #788978; outline-offset: 5px; }
a, button { transition: color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--ease); }
img { display: block; max-width: 100%; }
figure, dl, dd, p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.11; text-wrap: balance; overflow-wrap: anywhere; }
h2 { font-weight: 500; font-size: var(--section); letter-spacing: -.032em; }
h3 { font-size: clamp(1.24rem, 1.9vw, 1.74rem); font-weight: 500; }
section[id] { scroll-margin-top: 23px; }
.frame { width: min(100%, 1680px); margin-inline: auto; padding-inline: var(--side); }
.skip { position: absolute; left: 16px; top: 14px; z-index: 10; background: var(--ink); color: var(--white); padding: 10px 15px; transform: translateY(-200%); }
.skip:focus { transform: none; }

.site-header { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-inline: var(--side); background: var(--paper); }
.site-header nav { display: flex; align-items: center; gap: clamp(18px, 3.4vw, 52px); white-space: nowrap; }
.site-header nav a { display: flex; align-items: center; min-height: 45px; font-size: 1rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; text-underline-offset: .4em; }
.wordmark { white-space: nowrap; font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; }
.button { width: max-content; max-width: 100%; min-height: 49px; align-items: center; display: inline-flex; justify-content: space-between; gap: 1.6rem; padding: .75rem 1.2rem; background: var(--olive); color: var(--white); font-size: 1rem; line-height: 1.2; }
.button:hover { background: var(--ink); }
.button:active { transform: translateY(2px); }
.button span { font-size: 1.15rem; }

.showroom { display: grid; grid-template-columns: 43% 57%; align-items: start; background: var(--secondary); }
.showroom-copy { min-width: 0; }
.home-hero { display: flex; align-items: center; min-height: max(555px, min(82svh, 850px)); padding: 65px clamp(24px, 4.2vw, 65px) 76px var(--side); background: var(--paper); }
.hero-copy { max-width: 100%; }
.hero-title { font-size: var(--display); font-weight: 500; letter-spacing: -.033em; line-height: 1.05; }
.hero-title > span { display: block; }
.hero-name { margin-top: clamp(23px, 3vw, 39px); font-weight: 600; font-size: clamp(1.06rem, 1.25vw, 1.3rem); }
.hero-name > span { padding-inline: .14em; }
.hero-summary { margin-top: .6rem; color: var(--muted); max-width: 27em; }
.hero-summary span { white-space: nowrap; }
.showroom-stage { position: sticky; top: 0; height: max(555px, min(82svh, 850px)); isolation: isolate; overflow: hidden; background: var(--secondary); }
.stage-image { position: absolute; z-index: -1; inset: 0; overflow: hidden; }
.stage-image img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 52%; }
.stage-image img[data-scene="catalogue"] { object-position: 65% center; }
.stage-image img[data-scene="film"] { object-position: 44% center; }
.work-index { padding: 72px clamp(22px, 3.7vw, 56px) 86px var(--side); background: var(--secondary); }
.work-index h2 { margin-bottom: clamp(22px, 3.6vw, 51px); }
.project-list { list-style: none; display: grid; gap: .6rem; }
.project-entry { display: grid; align-items: center; grid-template-columns: clamp(70px, 6.3vw, 125px) 1fr auto; gap: clamp(11px, 1.45vw, 25px); min-height: 83px; padding-block: .55rem; }
.entry-image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.entry-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s var(--ease); }
.entry-copy { min-width: 0; }
.entry-copy h3 { text-wrap: wrap; }
.entry-copy p { font-size: .9rem; color: var(--muted); line-height: 1.5; margin-top: .35rem; }
.entry-arrow { font-size: 1.28rem; padding: .3rem; align-self: center; transition: transform .24s var(--ease); }
.project-entry:hover .entry-image img, .project-entry:focus-visible .entry-image img { transform: scale(1.08); }
.project-entry:hover .entry-arrow, .project-entry:focus-visible .entry-arrow { transform: translate(3px, -3px); }

.about { background: var(--paper); padding-block: clamp(57px, 7.1vw, 112px); }
.about-layout { display: grid; grid-template-columns: 45% 1fr; align-items: center; gap: clamp(30px, 7vw, 120px); }
.about-portrait { width: 100%; max-width: 630px; aspect-ratio: 4 / 4.75; overflow: hidden; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.about-copy { max-width: 600px; }
.about-intro { margin-top: 1.35rem; line-height: 1.85; text-wrap: pretty; }
.expertise { display: grid; gap: 1rem; margin-top: 2rem; }
.expertise dt { font-weight: 600; font-size: 1rem; }
.expertise dd { color: var(--muted); font-size: .925rem; }

.slide-thumb { display: block; min-width: 0; position: relative; }
.slide-thumb img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: contain; background: var(--paper); transition: transform .25s var(--ease); }
.slide-thumb:hover img { transform: translateY(-3px); }
.slide-thumb span { display: block; margin-top: .5rem; font-size: .9rem; }
.slide-thumb:hover span { text-decoration: underline; text-underline-offset: .3em; }
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(52px, 8vw, 114px); }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 30px; }
.closing { font-size: clamp(1.42rem, 2.55vw, 2.23rem); line-height: 1.23; }
.footer-links { display: grid; min-width: min(25%, 255px); gap: .5rem; font-size: .98rem; }
.footer-links a { width: fit-content; text-decoration: underline; text-underline-offset: .27em; }

.case-hero { display: grid; grid-template-columns: 43% 57%; min-height: min(68svh, 770px); background: var(--secondary); }
.case-hero-copy { padding: clamp(25px, 4vw, 60px) clamp(30px, 4vw, 64px) clamp(34px, 4vw, 64px) var(--side); display: flex; flex-direction: column; justify-content: space-between; gap: clamp(24px, 3vw, 45px); }
.back-link { display: inline-flex; width: max-content; align-items: center; min-height: 44px; font-size: .95rem; }
.back-link:hover { text-decoration: underline; text-underline-offset: .3em; }
.case-hero h1, .archive-intro h1 { font-size: clamp(2.85rem, 4.6vw, 5.35rem); font-weight: 500; letter-spacing: -.055em; text-wrap: wrap; }
.case-name { margin-top: 1.05rem; font-size: clamp(1.2rem, 1.7vw, 1.7rem); font-weight: 600; }
.case-intro { margin-top: .85rem; max-width: 43ch; }
.case-cover { position: relative; min-height: 100%; }
.case-cover img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.case-cover-catalogue img { object-position: 65% center; }
.case-cover-film img { object-position: 44% center; }
.case-jump, .archive-jump { display: flex; flex-wrap: wrap; gap: .25rem clamp(14px, 1.6vw, 26px); }
.case-jump a, .archive-jump a { font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: .34em; }
.case-jump a:hover, .archive-jump a:hover { color: #687854; }
.case-section { padding-block: clamp(55px, 8.3vw, 132px); }
.case-role, .case-section-lead { display: grid; grid-template-columns: 34% 1fr; gap: 30px clamp(24px, 4vw, 76px); align-items: start; }
.case-role ul { max-width: 44em; padding-left: 1.15em; }
.case-role li + li { margin-top: .7rem; }
.case-section-lead p { max-width: 43em; }
.case-strategy, .case-archive { background: var(--secondary); }
.case-photo-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(16px, 2.6vw, 45px); margin-top: clamp(28px, 5vw, 70px); }
.case-photo-row[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.case-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--paper); }
.case-photo figcaption { margin-top: .55rem; font-size: .95rem; }
.page-case:has(.case-cover-catalogue) .case-photo img[src*="catalogue-concept"] { object-fit: contain; background: #dbccda; }
.page-case:has(.case-cover-film) .case-photo img[src*="film-reference"] { object-fit: contain; }
.case-archive-inner { display: grid; grid-template-columns: .9fr 1fr; gap: clamp(22px, 6vw, 110px); align-items: center; padding-block: clamp(56px, 8vw, 132px); }
.case-archive-inner p { margin-top: .7rem; }
.case-archive-inner .button { margin-top: 1.25rem; }
.next-project { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: clamp(38px, 6vw, 89px); }
.next-project strong { font-weight: 500; font-size: clamp(1.2rem, 3.3vw, 2.7rem); }
.next-project:hover strong { text-decoration: underline; text-underline-offset: .21em; }

.archive-intro { padding-top: clamp(18px, 4vw, 58px); padding-bottom: clamp(24px, 5vw, 85px); }
.archive-intro h1 { margin-top: .6rem; }
.archive-intro p { margin-top: .75rem; }
.archive-jump { margin-top: 1.1rem; }
.archive-group { padding-block: clamp(25px, 4vw, 62px); }
.archive-group:last-child { padding-bottom: clamp(60px, 8vw, 130px); }
.archive-group h2 { font-size: clamp(1.45rem, 2.6vw, 2.4rem); margin-bottom: 1rem; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2.5vw, 40px); }
.archive-grid .slide-thumb img { background-color: var(--secondary); }

.viewer { position: fixed; width: 100%; max-width: 100%; height: 100%; max-height: 100%; inset: 0; padding: 0; margin: 0; border: 0; background: #1b251e; color: var(--paper); }
.viewer::backdrop { background: #1b251e; }
.viewer-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer-header, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px clamp(12px, 3.5vw, 52px); }
.viewer-header h2 { color: var(--paper); font-size: 1.05rem; font-weight: 500; }
.viewer-stage { min-width: 0; overflow: auto; background: #27322b; overscroll-behavior: contain; padding: 12px; }
.viewer-stage img { width: var(--viewer-width, 100%); max-width: none; height: auto; aspect-ratio: 16 / 9; background: var(--paper); cursor: zoom-in; margin-inline: auto; }
.viewer-stage.zoomed img { cursor: zoom-out; }
.viewer button, .viewer-original { min-width: 39px; min-height: 44px; padding: 4px 10px; appearance: none; background: transparent; border: 0; color: inherit; cursor: pointer; white-space: nowrap; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; }
.viewer button:hover, .viewer-original:hover { background: #40513d; }
.viewer button:disabled { opacity: .45; cursor: default; }
.viewer-close span { margin-left: .45em; font-size: 1.2rem; }
.viewer-pages, .viewer-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
.viewer-pages button, .viewer-tools button:not([data-control="fit"]) { font-size: 1.28rem; }
.viewer-count { font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: center; min-width: 58px; }

@media (max-width: 925px) {
  .showroom, .case-hero { grid-template-columns: 47% 53%; }
  .home-hero, .showroom-stage { min-height: 0; }
  .home-hero { min-height: max(485px, min(73svh, 715px)); }
  .showroom-stage { height: max(485px, min(73svh, 715px)); }
  .case-hero h1 { font-size: clamp(2.45rem, 4.6vw, 4rem); }
}

@media (max-width: 820px) {
  .site-header { height: 62px; }
  .site-header nav { gap: clamp(9px, 3.8vw, 26px); }
  .site-header nav a { font-size: .9rem; }
  .wordmark { font-size: 1.1rem; }
  .showroom { display: flex; flex-direction: column; align-items: stretch; }
  .showroom-copy { display: contents; }
  .home-hero { min-height: 0; padding: 43px var(--side) 38px; order: 0; }
  .hero-title { font-size: clamp(3.05rem, 9.6vw, 4.6rem); }
  .hero-name { margin-top: 1.05rem; }
  .hero-summary { margin-top: .4rem; font-size: .94rem; }
  .showroom-stage { position: relative; top: auto; height: clamp(240px, 77vw, 500px); order: 1; }
  .stage-image img { object-position: 50% 57%; }
  .work-index { padding: 46px var(--side) 58px; order: 2; }
  .project-entry { gap: clamp(13px, 4vw, 22px); grid-template-columns: clamp(80px, 25vw, 180px) 1fr max-content; }
  .entry-image { aspect-ratio: 3 / 2; }
  .entry-arrow { font-size: 1.08rem; padding-inline: .1rem; }
  .about-layout { grid-template-columns: 1fr; gap: 26px; }
  .about-portrait { max-width: min(100%, 510px); aspect-ratio: 4 / 4.5; }
  .about-intro { margin-top: 1rem; }
  .expertise { margin-top: 1.4rem; }
  .footer-inner { flex-direction: column; gap: 1.6rem; }
  .case-hero { display: flex; flex-direction: column; }
  .case-hero-copy { padding: 14px var(--side) 28px; gap: 15px; }
  .case-intro { margin-top: .75rem; }
  .case-name { margin-top: .75rem; }
  .case-cover { min-height: 0; aspect-ratio: 16 / 11; }
  .case-role, .case-section-lead, .case-archive-inner { grid-template-columns: 1fr; gap: 18px; }
  .case-photo-row, .case-photo-row[data-count="3"] { grid-template-columns: 1fr; }
  .case-photo-row .case-photo img { aspect-ratio: 16 / 10; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-controls { flex-wrap: wrap; justify-content: center; column-gap: 13px; row-gap: 3px; }
  .viewer button, .viewer-original { padding-inline: 7px; min-width: 34px; }
}

@media (max-width: 350px) {
  .site-header { padding-inline: 15px; }
  .site-header nav { gap: 9px; }
  .entry-copy p { font-size: .82rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title span { animation: arrive .76s var(--ease) both; }
  .hero-title span:nth-child(2) { animation-delay: .085s; }
  .hero-name { animation: arrive .75s .16s var(--ease) both; }
  .hero-summary { animation: arrive .75s .22s var(--ease) both; }
  .stage-image img { animation: image-settle 1.05s var(--ease) both; }
  [data-reveal].is-visible { animation: arrive .7s var(--ease) both; animation-delay: var(--reveal-delay, 0ms); }
  .case-photo.is-visible, .about-portrait.is-visible { animation-name: image-reveal; }
  @keyframes arrive { from { opacity: 0; transform: translateY(17px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes image-settle { from { opacity: .72; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
  @keyframes image-reveal { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
}

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