:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --container-width: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: var(--stone-50);
  line-height: 1.7;
}

body.case-lightbox-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 249, 0.95);
  border-bottom: 1px solid var(--stone-200);
  backdrop-filter: blur(8px);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--stone-900);
  outline: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand:hover .brand-icon {
  background: var(--stone-900);
  color: var(--stone-50);
}

.brand-text {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-600);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--stone-900);
}

.page-header {
  padding: 48px 0 24px;
}

.breadcrumbs {
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--stone-500);
}

.breadcrumbs a {
  color: var(--stone-600);
}

.breadcrumbs span {
  margin: 0 6px;
}

.page-title {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  color: var(--stone-900);
}

.page-summary {
  margin-top: 14px;
  max-width: 820px;
  color: var(--stone-600);
}

.page-meta {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--stone-500);
  text-transform: uppercase;
}

.main-wrap {
  padding-bottom: 64px;
}

.section {
  margin-top: 28px;
  border: 1px solid var(--stone-200);
  background: #fff;
  padding: 28px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 28px;
  color: var(--stone-900);
  font-family: "Noto Serif SC", serif;
}

.section h3 {
  margin: 18px 0 8px;
  font-size: 19px;
  color: var(--stone-900);
  font-family: "Noto Serif SC", serif;
}

.section p,
.section li {
  color: var(--stone-600);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  border: 1px solid var(--stone-200);
  background: var(--stone-50);
  padding: 16px;
}

.card h3 {
  margin-top: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  border: 1px solid var(--stone-300);
  background: #fff;
  font-size: 12px;
  color: var(--stone-600);
  letter-spacing: 0.06em;
  padding: 5px 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border: 1px solid var(--stone-200);
  text-align: left;
  padding: 10px;
  font-size: 14px;
  color: var(--stone-600);
  vertical-align: top;
}

.table th {
  color: var(--stone-900);
  background: var(--stone-100);
}

.faq-item {
  border-top: 1px solid var(--stone-200);
  padding: 12px 0;
}

.faq-item:first-child {
  border-top: 0;
}

.faq-item h3 {
  margin: 0 0 6px;
}

.cta {
  margin-top: 28px;
  border: 1px solid var(--stone-900);
  background: var(--stone-900);
  color: #fff;
  padding: 24px;
}

.cta h2 {
  color: #fff;
  margin-top: 0;
}

.cta p {
  color: var(--stone-200);
}

.btn-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-block;
  border: 1px solid #fff;
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn.secondary {
  border-color: var(--stone-300);
  color: var(--stone-900);
  background: #fff;
}

.note {
  font-size: 13px;
  color: var(--stone-500);
}

.case-hero {
  border: 1px solid var(--stone-200);
  background: var(--stone-100);
}

.case-hero img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.case-gallery-item {
  margin: 0;
  border: 1px solid var(--stone-200);
  background: var(--stone-100);
  content-visibility: auto;
  contain-intrinsic-size: 320px 420px;
}

.case-gallery-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.case-gallery-item img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  aspect-ratio: auto;
  transition: opacity 0.22s ease;
}

.case-gallery-item.is-loading {
  background: linear-gradient(120deg, #f2efeb 8%, #f8f6f3 18%, #f2efeb 33%);
  background-size: 200% 100%;
  animation: galleryShimmer 1.4s linear infinite;
}

.case-gallery-item.is-preview img {
  opacity: 0.96;
}

.case-gallery-item.is-sharp img {
  opacity: 1;
}

.case-gallery-load-more {
  grid-column: 1 / -1;
  min-height: 54px;
  border: 1px solid var(--stone-300);
  background: #fff;
  color: var(--stone-700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}

.case-gallery-empty {
  margin: 0;
  font-size: 13px;
  color: var(--stone-500);
}

.case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.case-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.case-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(4px);
}

.case-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1400px, calc(100vw - 40px));
  height: min(92vh, 980px);
  margin: 4vh auto;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
}

.case-lightbox-close,
.case-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.case-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 30px;
}

.case-lightbox-nav {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  justify-self: center;
}

.case-lightbox-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.case-lightbox-figure {
  margin: 0;
  text-align: center;
}

.case-lightbox-image {
  max-width: 100%;
  max-height: calc(92vh - 86px);
  margin: 0 auto;
  object-fit: contain;
}

.case-lightbox-caption {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes galleryShimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

footer {
  margin-top: 40px;
  border-top: 1px solid var(--stone-200);
  padding: 24px 0 36px;
  text-align: center;
  color: var(--stone-500);
  font-size: 12px;
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 16px;
    letter-spacing: 0.14em;
  }

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

  .case-lightbox-dialog {
    grid-template-columns: 1fr;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .case-lightbox-nav {
    display: none;
  }

  .case-lightbox-image {
    max-height: calc(100vh - 116px);
  }

  .case-lightbox-caption {
    flex-direction: column;
    gap: 6px;
  }

  .section {
    padding: 20px;
  }

  .page-header {
    padding-top: 34px;
  }
}
