@font-face {
  font-family: "Liuguang Serif";
  src: url("fonts/liuguang-serif.woff2?v=3") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Liuguang Sans";
  src: url("fonts/liuguang-sans.woff2?v=3") format("woff2");
  font-weight: 400 650;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --sand: #f1e7d7;
  --ink: #282820;
  --muted: #4e4a40;
  --line: #c2b8a9;
  --olive: #414a36;
  --forest: #373f2f;
  --display: "Liuguang Serif", "Noto Serif TC", "Songti TC", PMingLiU, Georgia, serif;
  --reading: "Liuguang Sans", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --u: min(1vw, 16px);
  --edge: calc(var(--u) * 3.13);
  font-family: var(--reading);
  font-size: 16px;
  line-height: 1.58;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 3.25vw, 3.25rem); letter-spacing: .04em; }
:focus-visible { outline: 2px solid #46503a; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 3; top: .5rem; left: .5rem; color: white; background: var(--olive); padding: .5rem .8rem; transform: translateY(-170%); }
.skip-link:focus { transform: none; }
.site { width: min(100%, 1600px); margin-inline: auto; }
.site-header, .site-footer { display: flex; align-items: center; }
.site-header { position: relative; min-height: max(55px, calc(var(--u) * 5.95)); padding: 0 calc(var(--u) * 4.25) 0 calc(var(--u) * 4.7); gap: calc(var(--u) * 4.65); border-bottom: 1px solid var(--line); background: var(--paper); }
.wordmark { flex: none; font-family: var(--display); font-size: clamp(1.15rem, 2.35vw, 2.35rem); font-weight: 650; letter-spacing: .12em; line-height: 1.18; white-space: nowrap; }
.site-header nav { display: flex; gap: calc(var(--u) * 4.06); margin-left: auto; align-items: center; }
.site-header nav a, .site-footer nav a { white-space: nowrap; letter-spacing: .04em; font-size: clamp(.87rem, 1.35vw, 1.32rem); }
.site-header nav a:hover, .site-footer nav a:hover, .text-link:hover { color: var(--olive); text-decoration: underline; text-underline-offset: .25em; }
.menu-toggle { display: none; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; padding: .48em 1.25em; border: 1px solid transparent; background: var(--olive); color: #fffcf5; font-weight: 500; letter-spacing: .08em; cursor: pointer; }
.button:hover:not(:disabled) { background: #313928; }
.button:disabled { cursor: default; }
.header-cta { min-height: max(36px, calc(var(--u) * 3.1)); padding-inline: 1.16em; font-size: clamp(.85rem, 1.27vw, 1.25rem); white-space: nowrap; }

.photo { position: relative; overflow: hidden; background-color: #cfc1ad; }
.photo::before, .inquiry-copy::before { content: ""; position: absolute; inset: 0; background: var(--photo) center / var(--photo-fit, cover) no-repeat; }
.photo-window { --photo: url("images/space-window.jpg"); aspect-ratio: 406 / 212; }
.photo-corner { --photo: url("images/space-corner.jpg"); aspect-ratio: 258 / 212; }
.photo-wall { --photo: url("images/space-wall.jpg"); aspect-ratio: 258 / 212; }
.photo-study { --photo: url("images/space-study.jpg"); aspect-ratio: 4 / 3; }
.photo-passage { --photo: url("images/space-passage.jpg"); aspect-ratio: 4 / 3; }
.photo-tea { --photo: url("images/space-tea.jpg"); aspect-ratio: 4 / 3; }
.photo-materials { --photo: url("images/materials.jpg"); aspect-ratio: 488 / 221; }
.hero-carousel { position: relative; min-width: 0; }
.hero-viewport { aspect-ratio: 643 / 364; position: relative; overflow: hidden; background: #cfc1ad; }
.hero-slide { position: absolute; inset: 0; margin: 0; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel-controls { position: absolute; right: .7rem; bottom: .7rem; display: flex; align-items: center; gap: .13rem; background: #222219d9; color: #fffcf5; padding: .15rem .2rem; }
.carousel-controls button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; background: transparent; color: inherit; font-size: 1.65rem; }
.carousel-controls button:hover { background: #ffffff28; }
.carousel-controls button:focus-visible { outline: 2px solid #fff6e7; outline-offset: -3px; }
.carousel-controls span { min-width: 3em; font-variant-numeric: tabular-nums; text-align: center; font-size: .82rem; }
[data-carousel-toggle] i { width: 11px; height: 13px; border-inline: 3px solid currentColor; }
[data-carousel-toggle][data-playing="false"] i { width: 0; height: 0; border: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }
.photo.is-in-view::before, .inquiry-copy.is-in-view::before, .hero-carousel.is-in-view .hero-slide:not([hidden]) img { animation: photo-drift 13s cubic-bezier(.25,.38,.42,1) both; }
.hero-slide:not([hidden]) { animation: slide-reveal .55s ease-out both; }
@keyframes photo-drift { from { transform: scale(1) translate(0,0); } to { transform: scale(1.078) translate(-1.1%,.6%); } }
@keyframes slide-reveal { from { opacity: .5; } to { opacity: 1; } }

.hero { display: grid; grid-template-columns: minmax(0,35fr) minmax(0,65fr); align-items: center; padding: calc(var(--u) * 2.25) var(--edge) calc(var(--u) * 1.55) 0; background: #f3eadb url("images/hero-paper.jpg") left 58% / 53% auto no-repeat; }
.hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: calc(var(--u) * 2.1) calc(var(--u) * 1.4) calc(var(--u) * 2.1) calc(var(--u) * 4.85); }
.hero-eyebrow { color: var(--muted); font-size: clamp(.88rem,1.34vw,1.3rem); letter-spacing: .04em; }
.hero h1 { font-size: clamp(2.05rem,4.65vw,4.62rem); letter-spacing: .04em; line-height: 1.2; margin: .5em 0 .48em; }
.hero-description { font-size: clamp(.875rem,1.28vw,1.26rem); line-height: 1.65; color: #38352f; letter-spacing: .025em; }
.hero-actions { display: flex; align-items: center; gap: .65rem calc(var(--u) * 2.5); flex-wrap: wrap; margin-top: calc(var(--u) * 2.55); white-space: nowrap; }
.button-hero { min-height: max(42px, calc(var(--u) * 4.08)); padding-inline: 1.82em; font-size: clamp(.95rem,1.48vw,1.43rem); }
.text-link { font-size: clamp(.88rem,1.39vw,1.35rem); letter-spacing: .045em; text-decoration: underline; text-underline-offset: .35em; }

.works { padding: calc(var(--u) * 2.55) var(--edge) calc(var(--u) * 2.65); }
.works-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 1rem; row-gap: .65rem; margin: 0 0 calc(var(--u) * 1.95) calc(var(--u) * 1.52); }
.filters { display: flex; flex-wrap: wrap; gap: calc(var(--u) * .9); }
.filters button { color: var(--ink); border: 1px solid transparent; background: transparent; min-height: max(36px, calc(var(--u) * 2.67)); padding: .18em .87em; font-size: clamp(.88rem,1.36vw,1.3rem); white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--olive); color: white; }
.filters button:hover:not([aria-pressed="true"]) { border-color: #8c907e; }
.work-grid { display: grid; grid-template-columns: minmax(0,1.575fr) minmax(0,1fr) minmax(0,1fr); gap: calc(var(--u) * 2.45) calc(var(--u) * 1.5); }
.work-grid.is-filtered { grid-template-columns: repeat(2, minmax(0,1fr)); }
.work-card, .work-link { min-width: 0; }
.work-link { display: block; }
.work-link:hover h3 { color: var(--olive); text-decoration: underline; text-underline-offset: .23em; }
.work-grid .photo { aspect-ratio: auto; height: calc(var(--u) * 20.9); }
.work-grid.is-filtered .photo { height: auto; aspect-ratio: 1.7; }
.work-caption { display: flex; flex-wrap: wrap; align-items: center; gap: .65em; margin-top: .62em; }
.work-caption h3 { font-size: clamp(1.15rem,2.06vw,2.08rem); letter-spacing: .02em; }
.work-caption span { color: var(--muted); border: 1px solid var(--line); background: #eee5d6; padding: 0 .53em; font-size: clamp(.76rem,1.09vw,1.04rem); white-space: nowrap; }
.work-card p { color: var(--muted); margin-top: .43em; font-size: clamp(.92rem,1.23vw,1.19rem); letter-spacing: .025em; }

.approach { display: grid; grid-template-columns: minmax(0,47.7fr) minmax(0,52.3fr); background: var(--forest); color: #fff6e7; }
.photo-materials { width: 100%; min-height: 100%; }
.approach-copy { align-self: center; padding: calc(var(--u) * 2.55) calc(var(--u) * 4.8) calc(var(--u) * 2.55) calc(var(--u) * 6.65); }
.approach-label { font-size: clamp(.9rem,1.42vw,1.35rem); letter-spacing: .11em; }
.approach-label::after { content: ""; display: block; width: 5.2em; height: 1px; margin-top: .56em; background: #c7c6a3; }
.approach h2 { font-size: clamp(1.9rem,3.89vw,3.93rem); margin: .36em 0 .3em; }
.approach-copy > p:last-child { color: #eee8db; font-size: clamp(.94rem,1.42vw,1.36rem); line-height: 1.75; letter-spacing: .025em; }

.process { display: grid; grid-template-columns: auto minmax(0,1fr); gap: calc(var(--u) * 3.85); align-items: center; min-height: calc(var(--u) * 10.8); padding: calc(var(--u) * 2.15) calc(var(--u) * 4.65); }
.process h2 { font-size: clamp(1.45rem,2.75vw,2.73rem); white-space: nowrap; }
.process ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; margin: 0; padding: 0; }
.process li { border-left: 1px solid #b8aea0; padding-left: calc(var(--u) * 3.5); padding-right: calc(var(--u) * 1.95); }
.process li:last-child { padding-right: 0; }
.process h3 { font-size: clamp(1.05rem,1.73vw,1.68rem); margin: 0 0 .34em; }
.process li p { color: var(--muted); font-size: clamp(.9rem,1.17vw,1.11rem); line-height: 1.55; }

.inquiry { display: grid; grid-template-columns: minmax(0,49.9fr) minmax(0,50.1fr); align-items: stretch; padding: calc(var(--u) * 1.52) calc(var(--u) * 2.55); background: var(--sand); }
.inquiry-copy { --photo: url("images/inquiry.jpg"); display: flex; align-items: center; position: relative; overflow: hidden; isolation: isolate; min-height: calc(var(--u) * 24.6); padding: calc(var(--u) * 2) calc(var(--u) * 2) calc(var(--u) * 2) 43%; background: #d7cabb; }
.inquiry-copy::before { z-index: -2; }
.inquiry-copy::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,transparent 28%,#f2e5d254 55%,#f2e5d296); }
.inquiry-copy h2 { font-size: clamp(1.75rem,3.18vw,3.23rem); letter-spacing: .02em; }
.inquiry-copy p { margin-top: .62em; font-size: clamp(.875rem,1.35vw,1.32rem); line-height: 1.5; }
.inquiry-panel { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--u) * 1.25) calc(var(--u) * 1.82) calc(var(--u) * 1.25) calc(var(--u) * 3.85); }
.inquiry-form { display: grid; grid-template-columns: minmax(5.3em, 1fr) minmax(0,3.4fr); align-items: start; gap: calc(var(--u) * .57) calc(var(--u) * 1.21); }
.inquiry-form > label { white-space: nowrap; padding-top: .22em; font-size: clamp(.89rem,1.27vw,1.24rem); }
.inquiry-form input, .inquiry-form select, .inquiry-form textarea, .inquiry-result { width: 100%; min-width: 0; min-height: max(32px,calc(var(--u) * 2.56)); border: 1px solid #9e917f; color: var(--ink); background: #fffaf260; padding: .18em .58em; border-radius: 0; font-size: clamp(.91rem,1.18vw,1.18rem); }
.inquiry-form textarea { resize: vertical; min-height: max(42px,calc(var(--u) * 4.56)); }
.inquiry-form select { appearance: none; padding-right: 1.45em; background: linear-gradient(45deg,transparent 50%,#59554b 50%) right 14px center/6px 6px no-repeat, linear-gradient(135deg,#59554b 50%,transparent 50%) right 8px center/6px 6px no-repeat, #f5f1ec65; }
.form-submit { grid-column: 2; min-height: max(38px,calc(var(--u) * 3.55)); width: 100%; margin-top: .35em; font-size: clamp(.93rem,1.34vw,1.28rem); }
.form-status { margin-top: .55em; color: #333b29; font-size: .95rem; }
.inquiry-result { margin-top: .5em; resize: vertical; }

.site-footer { min-height: max(54px,calc(var(--u) * 4.42)); margin: calc(var(--u) * .44) calc(var(--u) * 2.53) 0; padding: .36em calc(var(--u) * 1.35); border-top: 1px solid #a29a8d; justify-content: space-between; gap: .9em; }
.site-footer .wordmark { font-size: clamp(1rem,1.63vw,1.59rem); }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: calc(var(--u) * 4.2); }
.site-footer nav a { font-size: clamp(.83rem,1.21vw,1.17rem); }

.case-dialog { width: min(790px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; border: 1px solid #b0a698; padding: clamp(1rem,3vw,2rem); color: var(--ink); background: var(--paper); }
.case-dialog::backdrop { background: #29251fac; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.case-category { color: var(--muted); font-size: .91rem; }
.dialog-close { min-height: 39px; padding: .2em .65em; color: var(--ink); background: transparent; border: 1px solid var(--line); }
.case-dialog h2 { margin: .12em 0 .55em; font-size: clamp(1.65rem,3.2vw,2.65rem); }
.case-photo { --photo-fit: contain; width: 100%; max-height: min(48dvh,460px); background-color: #e9e1d4; }
.case-description { margin: .85em 0 .45em; }

@media (max-width: 900px) {
  .hero h1 { font-size: clamp(1.9rem,4.38vw,3rem); }
  .inquiry-copy { padding-left: 34%; }
}
@media (max-width: 740px) {
  :root { --edge: 1.2rem; }
  .site-header { min-height: 64px; padding: 0 var(--edge); gap: .65rem; }
  .wordmark { font-size: clamp(1rem,4.45vw,1.4rem); letter-spacing: .065em; }
  .menu-toggle { display: block; min-height: 44px; margin-left: auto; border: 0; background: none; color: var(--ink); padding: .2em .15em; white-space: nowrap; }
  .site-header nav { display: none; position: absolute; z-index: 2; top: 100%; left: 0; right: 0; margin: 0; padding: .2em var(--edge) .7em; border-bottom: 1px solid var(--line); background: var(--paper); }
  .site-header nav.is-open { display: grid; gap: 0; }
  .site-header nav a { display: flex; min-height: 44px; align-items: center; border-bottom: 1px solid #d5ccc1; }
  .header-cta { min-height: 39px; padding: .22em .5em; letter-spacing: 0; }
  .hero { grid-template-columns: 1fr; padding: 0 var(--edge) 1.25rem; background-size: cover; }
  .hero-copy { padding: 1.8rem 0 1.55rem; }
  .hero h1 { font-size: clamp(2.03rem,8vw,3.6rem); }
  .hero-description { font-size: .94rem; }
  .hero-actions { margin-top: 1rem; gap: 1.1rem; }
  .works { padding: 1.5rem var(--edge) 1.75rem; }
  .works-header { margin: 0 0 1rem; gap: .75rem; }
  .filters { width: 100%; gap: .15rem; justify-content: space-between; }
  .filters button { min-height: 42px; padding-inline: .45rem; }
  .work-grid, .work-grid.is-filtered { grid-template-columns: 1fr; gap: 1.35rem; }
  .work-grid .photo, .work-grid.is-filtered .photo { height: auto; aspect-ratio: 1.55; }
  .approach { grid-template-columns: minmax(0,1fr); }
  .photo-materials { min-height: 0; }
  .approach-copy { padding: 1.3rem var(--edge) 1.55rem; }
  .process { grid-template-columns: 1fr; gap: .85rem; padding: 1.5rem var(--edge); }
  .process ol { grid-template-columns: 1fr; gap: .85rem; }
  .process li { padding: 0 0 0 .85rem; }
  .inquiry { grid-template-columns: 1fr; padding: var(--edge); }
  .inquiry-copy { padding: 1.35rem .7rem 1.35rem 39%; min-height: min(55vw,350px); }
  .inquiry-copy h2 { font-size: clamp(1.3rem,5vw,2.65rem); }
  .inquiry-copy p { font-size: .9rem; }
  .inquiry-panel { padding: 1.15rem 0 0; }
  .inquiry-form { gap: .55rem .7rem; }
  .inquiry-form input, .inquiry-form select { min-height: 42px; }
  .form-submit { min-height: 44px; width: 100%; }
  .site-footer { margin: 0 var(--edge); padding: .72rem 0; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo.is-in-view::before, .inquiry-copy.is-in-view::before, .hero-carousel.is-in-view .hero-slide:not([hidden]) img, .hero-slide:not([hidden]) { animation: none; }
}
