:root {
  --bg: #f6f3ee;
  --paper: #fffdf8;
  --ink: #20201d;
  --muted: #6f6a61;
  --line: rgba(32, 32, 29, 0.12);
  --green: #2f6b4f;
  --amber: #c98f36;
  --red: #a84a3a;
  --shadow: 0 18px 50px rgba(32, 32, 29, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  min-width: 58px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
}

.nav a:hover {
  background: rgba(32, 32, 29, 0.08);
  color: var(--ink);
}

main {
  overflow: clip;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  align-items: center;
  min-height: min(620px, calc(100vh - 72px));
  padding: clamp(54px, 8vw, 110px) clamp(18px, 5vw, 72px) clamp(44px, 6vw, 76px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-link {
  background: var(--ink);
  color: var(--paper);
}

.secondary-link {
  border: 1px solid var(--line);
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics div {
  padding: 18px 14px 16px 0;
}

.metrics dt {
  font-size: 28px;
  font-weight: 800;
}

.metrics dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.capabilities {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 72px);
  border: 1px solid var(--line);
  background: var(--line);
}

.capabilities span {
  min-height: 70px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.section {
  padding: clamp(58px, 8vw, 100px) clamp(18px, 5vw, 72px) 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

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

.work-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 107, 79, 0.3);
  box-shadow: var(--shadow);
}

.work-card:focus-visible {
  outline: 3px solid rgba(47, 107, 79, 0.35);
  outline-offset: 3px;
}

.thumb-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8e2d8;
}

.thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.tag-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(47, 107, 79, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.search {
  display: grid;
  gap: 8px;
  min-width: min(340px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}

.search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.14);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}

.filter-button,
.text-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.text-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.works-grid .card-title {
  font-size: 16px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  gap: 30px;
  align-items: end;
  margin: clamp(72px, 10vw, 120px) clamp(18px, 5vw, 72px) 32px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.contact p {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.7);
}

.contact .eyebrow {
  color: #e1bd72;
}

.contact-list {
  display: grid;
  gap: 10px;
  color: rgba(255, 253, 248, 0.82);
  font-weight: 700;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 20px;
  background: rgba(20, 20, 18, 0.72);
}

.viewer.is-open {
  display: grid;
  place-items: center;
}

.viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, 100%);
  height: min(92vh, 1100px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.viewer-topbar p,
.viewer-topbar h2 {
  margin: 0;
}

.viewer-topbar p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.viewer-topbar h2 {
  margin-top: 4px;
  font-size: 18px;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.viewer-body {
  overflow: auto;
  background: #e8e2d8;
}

.viewer-body img {
  width: min(790px, 100%);
  margin: 0 auto;
  background: white;
}

body.viewer-lock {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
  }

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

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
  }

  .hero {
    padding-top: 26px;
  }

  h1 {
    font-size: 38px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

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

  .section-heading.split,
  .contact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading.split {
    display: grid;
  }

  .viewer {
    padding: 0;
  }

  .viewer-panel {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

@media (max-width: 500px) {
  .capabilities,
  .featured-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .result-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
