:root {
  color-scheme: light;
  --page: #ffffff;
  --ink: #111111;
  --muted: #8f8f8f;
  --soft: #d8d8d8;
  --line: #ececec;
  --box: #444444;
  --radius: 4px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
}

body {
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

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

h1,
h2,
h3,
p,
dl {
  margin: 0;
}

.page-shell {
  width: 100%;
  overflow: hidden;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  padding: 14px 0 8px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.brand-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  line-height: 1;
}

.site-nav a,
.site-nav-btn,
.header-cta,
.more-link a,
.back-to-top {
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav-btn:hover,
.header-cta:hover,
.more-link a:hover,
.back-to-top:hover {
  opacity: 0.75;
}

.site-nav-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: #f2f2f2;
  color: #2d2d2d;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.hero {
  padding: 22px 0 50px;
}

.hero h1 {
  font-size: clamp(1.7rem, 2.3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.25;
}

.portfolio {
  padding-top: 10px;
}

.work-groups {
  display: grid;
  gap: 20px;
}

.case-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 28px 0 18px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dedede;
  border-radius: var(--radius);
  color: #4d4d4d;
  font-size: 12px;
  line-height: 1;
}

.pagination-link.is-active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.work-group {
  display: grid;
  gap: 10px;
}

.work-group h2 {
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.work-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: zoom-in;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-3px);
}

.work-card:hover .work-media,
.work-card:focus-visible .work-media {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
  transform: scale(1.01);
}

.work-media {
  aspect-ratio: 1.46 / 1;
  background: #ffffff;
  border: 1px solid #e3e3e3;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-caption {
  display: grid;
  gap: 2px;
  color: #6e6e6e;
  font-size: 11px;
  line-height: 1.15;
}

.work-caption strong {
  color: #454545;
  font-weight: 400;
}

.more-link {
  display: flex;
  justify-content: center;
  padding: 50px 0 42px;
  color: #4d4d4d;
  font-size: 13px;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
  gap: 44px;
  padding-top: 96px;
}

.portfolio + .content-section {
  padding-top: 100px;
}

.section-label {
  color: #c7c7c7;
  font-size: 12px;
  line-height: 1.35;
}

.section-main {
  min-width: 0;
}

.section-main h2 {
  max-width: 980px;
  font-size: clamp(1.8rem, 2.55vw, 2.55rem);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0;
  margin-top: -8px;
}

.about-section .section-main h2 {
  max-width: 980px;
  font-size: clamp(1.25rem, 1.65vw, 1.75rem);
  font-weight: 300;
  line-height: 1.5;
  margin-top: -8px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 70px;
  margin-top: 60px;
  max-width: 760px;
}

.service-item {
  min-width: 0;
}

.service-item h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid #d6d6d6;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.service-item p {
  margin-top: 12px;
  color: #a4a4a4;
  font-size: 13px;
  line-height: 1.6;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  max-width: 780px;
}

.about-block {
  aspect-ratio: 1 / 1.06;
  background: var(--box);
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 12px;
}

.preview-modal[hidden] {
  display: none;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

.preview-panel {
  position: relative;
  z-index: 1;
  width: min(1500px, 98vw);
  display: grid;
  gap: 10px;
}

.preview-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.preview-media {
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.14);
}

.preview-media img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
}

.preview-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: #5f5f5f;
  font-size: 13px;
}

.preview-caption h3 {
  font-size: 14px;
  font-weight: 500;
  color: #111111;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.contact-modal[hidden] {
  display: none;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(5px);
}

.contact-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 28px 24px 24px;
  border: 1px solid #ededed;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.14);
}

.contact-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f4;
  color: #111111;
  font-size: 26px;
  line-height: 1;
}

.contact-qr {
  width: min(280px, 100%);
  aspect-ratio: 1;
  padding: 12px;
  background: #f7f7f7;
}

.contact-qr img {
  width: 100%;
  height: 100%;
}

.contact-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.contact-copy h3 {
  font-size: 1rem;
  font-weight: 500;
}

.contact-copy p {
  color: #757575;
  font-size: 13px;
}

.contact-section {
  padding-bottom: 40px;
}

.contact-main {
  display: grid;
  gap: 36px;
}

.contact-main h2 {
  max-width: 640px;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: -12px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid #ededed;
  background: #f7f7f7;
  color: #3f3f3f;
  font-size: 12px;
  line-height: 1;
}

.action-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 32px;
  max-width: 500px;
  color: #9c9c9c;
  font-size: 12px;
  line-height: 1.55;
}

.contact-info dt {
  color: #b8b8b8;
}

.contact-info dd {
  margin: 0;
  color: #454545;
}

.site-footer {
  padding: 18px 0 34px;
  display: flex;
  justify-content: center;
}

.back-to-top {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #7d7d7d;
  font-size: 12px;
  line-height: 1;
}

.back-to-top span:first-child {
  font-size: 18px;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 76px;
  }

  .section-main h2 {
    max-width: 620px;
  }

  .about-section .section-main h2 {
    max-width: 100%;
  }

  .work-grid,
  .about-gallery {
    gap: 10px;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100%, calc(100% - 24px));
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px 18px;
    order: 3;
    width: 100%;
    padding-left: 0;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    padding-top: 18px;
  }

  .hero h1 {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .hero p {
    font-size: 0.95rem;
  }

  .work-grid,
  .service-grid,
  .about-gallery,
  .contact-info {
    grid-template-columns: 1fr;
  }

  .service-grid {
    gap: 24px;
  }

  .service-item h3 {
    font-size: 1.2rem;
  }

  .section-main h2 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .contact-main h2 {
    max-width: 11ch;
    font-size: clamp(2.25rem, 11vw, 3.2rem);
    line-height: 1.14;
  }

  .more-link {
    padding-bottom: 76px;
  }

  .case-pagination {
    justify-content: center;
    padding-top: 22px;
  }

  .preview-modal {
    padding: 12px;
  }

  .preview-panel {
    gap: 10px;
  }

  .preview-media img {
    max-height: calc(100dvh - 92px);
  }

  .preview-caption {
    flex-direction: column;
    align-items: start;
    gap: 4px;
  }

  .contact-modal {
    padding: 12px;
  }

  .contact-panel {
    width: min(360px, 100%);
    padding: 22px 18px 18px;
  }

  .contact-qr {
    width: min(240px, 100%);
  }
}
