:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #111;
  --muted: #6c6c68;
  --line: rgba(17, 17, 17, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

img,
video {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  min-height: 104px;
  padding: 40px clamp(26px, 4vw, 52px) 0;
}

.studio-brand {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #111;
  color: #fff;
  font-size: 29px;
  font-weight: 800;
}

.brand-name {
  padding-top: 1px;
  font-size: 17px;
  line-height: 0.98;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
  padding-top: 21px;
  font-size: 14px;
}

.site-nav a,
.site-nav button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: inherit;
  padding: 0 0 3px;
}

.site-nav a:hover,
.site-nav button:hover {
  border-bottom-color: currentColor;
}

.loading-state {
  min-height: 70vh;
  padding: 40vh 4vw 0;
}

.work-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 70px) clamp(22px, 4.2vw, 66px);
  padding: clamp(42px, 7vh, 76px) clamp(26px, 4vw, 52px) clamp(80px, 10vw, 140px);
}

.work-tile {
  min-width: 0;
}

.work-tile figure {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  margin: 0 0 14px;
  overflow: hidden;
  background: #f1f1ef;
}

.work-tile img {
  position: absolute;
  inset: 0;
  max-height: none;
  height: 100%;
  object-fit: cover;
  transition: opacity 220ms ease;
}

.work-tile:hover img {
  opacity: 0.88;
}

.work-tile h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
}

.category-page,
.project-page,
.services-page {
  padding: 30px clamp(26px, 4vw, 52px) clamp(110px, 14vw, 190px);
}

.studio-case-list {
  display: grid;
  gap: clamp(64px, 8vw, 110px);
  margin-top: clamp(44px, 6vw, 76px);
}

.studio-case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}

.studio-case-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(100%, 620px);
  overflow: hidden;
  background: #f2f2f0;
}

.studio-case-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.studio-case-copy {
  max-width: 470px;
}

.studio-case-copy h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 400;
  line-height: 1.05;
}

.studio-case-copy p {
  margin: 0;
  color: #383836;
  font-size: 15px;
  line-height: 1.8;
}

.read-more,
.text-button,
.project-text button {
  display: inline-block;
  margin-top: 28px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  padding: 0 0 4px;
  font-size: 13px;
}

.project-hero {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: #f1f1ef;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.project-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.project-hero a {
  position: absolute;
  inset: 0;
  display: block;
}

.project-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  width: min(760px, 72%);
  margin: clamp(70px, 10vw, 140px) auto clamp(120px, 16vw, 230px);
}

.project-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
}

.project-text button {
  align-self: start;
  margin-top: 4px;
  white-space: nowrap;
}

.editorial-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 6px;
  gap: 14px;
  align-items: start;
}

.gallery-piece {
  margin: 0;
  min-width: 0;
}

.gallery-piece img,
.gallery-piece video {
  width: 100%;
}

.gallery-piece img {
  height: auto;
  max-height: none;
  object-fit: contain;
}

.gallery-piece > a {
  display: block;
}

.gallery-piece video {
  height: auto;
  object-fit: contain;
}

.gallery-piece.is-landscape {
  grid-column: span 2;
}

.gallery-piece.is-square {
  grid-column: span 1;
}

.gallery-piece.is-video {
  grid-column: span 1;
}

.gallery-piece.is-video video {
  background: #111;
}

.gallery-piece.is-portrait {
  grid-column: span 1;
}

.project-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--ink);
  margin-top: clamp(140px, 18vw, 260px);
  padding-top: 18px;
}

.project-pagination a:last-child {
  text-align: right;
}

.project-pagination span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.services-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
  gap: 60px;
  align-items: end;
  margin: clamp(100px, 15vw, 220px) 0 clamp(80px, 10vw, 150px);
}

.services-intro h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 86px);
  font-weight: 400;
  line-height: 1;
}

.services-intro p,
.services-note {
  color: var(--muted);
  line-height: 1.8;
}

.services-list {
  border-top: 1px solid var(--ink);
}

.services-list div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.services-list p {
  margin: 0;
}

.services-note {
  max-width: 620px;
  margin-top: 34px;
}

.studio-footer {
  padding: clamp(80px, 12vw, 170px) clamp(26px, 4vw, 52px) 38px;
}

.studio-footer > button {
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  padding: 0 0 4px;
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1;
}

.studio-footer > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--ink);
  margin-top: clamp(70px, 10vw, 140px);
  padding-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.contact-modal {
  width: min(980px, calc(100vw - 30px));
  border: 1px solid var(--ink);
  padding: 0;
}

.contact-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  background: #fff;
  font-size: 20px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 290px);
  gap: clamp(50px, 8vw, 110px);
  align-items: center;
  padding: clamp(48px, 7vw, 88px);
}

.contact-layout h2 {
  margin: 0 0 32px;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 400;
  line-height: 0.9;
}

.contact-copy-block > p {
  max-width: 480px;
  margin: 0 0 38px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 30px;
}

.contact-links > a {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  font-size: 13px;
}

.contact-links .instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 0;
  padding-bottom: 0;
}

.instagram-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.contact-qr-card {
  margin: 0;
}

.contact-qr-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f7f7f5;
  padding: 12px;
}

.contact-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.contact-qr-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--ink);
  margin-top: 11px;
  padding-top: 8px;
}

.contact-qr-card figcaption strong,
.contact-qr-card figcaption span {
  font-size: 10px;
}

.contact-qr-card figcaption strong {
  letter-spacing: 0.08em;
}

.contact-qr-card figcaption span {
  color: var(--muted);
  text-align: right;
}

.not-found {
  min-height: 70vh;
  padding: 30vh 4vw 0;
}

.not-found h1 {
  font-size: 54px;
  font-weight: 400;
}

@media (max-width: 900px) {
  .work-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-case-row {
    grid-template-columns: 1fr;
  }

  .studio-case-copy {
    margin-left: auto;
  }

  .project-text {
    width: 82%;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 110px;
    padding: 28px 24px 0;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .brand-name {
    font-size: 13px;
  }

  .site-nav {
    gap: 15px;
    padding-top: 13px;
    font-size: 12px;
  }

  .site-nav a:nth-child(2) {
    display: none;
  }

  .work-home {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 52px 24px 88px;
  }

  .category-page,
  .project-page,
  .services-page {
    padding: 22px 24px 100px;
  }

  .page-title {
    font-size: 38px;
  }

  .studio-case-list {
    gap: 64px;
    margin-top: 46px;
  }

  .studio-case-image {
    min-height: 0;
  }

  .studio-case-copy {
    margin-left: 0;
  }

  .project-text {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 60px 0 110px;
  }

  .editorial-gallery {
    display: block;
  }

  .gallery-piece {
    margin-bottom: 72px;
  }

  .gallery-piece.is-portrait {
    width: 100%;
  }

  .gallery-piece.is-video {
    width: 100%;
  }

  .services-intro,
  .services-list div {
    grid-template-columns: 1fr;
  }

  .services-list div {
    gap: 10px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-qr-card {
    width: 220px;
  }
}
