:root {
  color-scheme: light;
  --ink: #20242c;
  --muted: #676b73;
  --paper: #f8f4ec;
  --paper-deep: #e8dece;
  --line: #c9bdac;
  --accent: #b94b32;
  --accent-soft: #eed1bd;
  --panel: #2d3038;
  --panel-text: #f6f0e6;
  --max: 1180px;
  --gutter: clamp(18px, 4vw, 56px);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid rgba(201, 189, 172, 0.75);
  background: rgba(248, 244, 236, 0.92);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  place-items: center;
  background: var(--ink);
  color: var(--panel-text);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  min-height: calc(100svh - 77px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 10vw, 120px) var(--gutter);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 9em;
  margin-bottom: 26px;
  font-size: clamp(48px, 8vw, 116px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(20px, 2vw, 28px);
}

.hero-text,
.section-heading p,
.about p {
  max-width: 66ch;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.button,
.filter-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
.filter-button.active {
  background: var(--ink);
  color: var(--panel-text);
}

.button.secondary,
.filter-button {
  background: transparent;
  color: var(--ink);
}

.button:hover,
.filter-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary:hover,
.filter-button.active:hover {
  background: var(--accent);
  color: var(--panel-text);
}

.hero-image {
  min-height: 560px;
  margin: 0;
  border-left: 1px solid var(--line);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 5vw, 80px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--gutter);
}

.intro > p {
  max-width: 58ch;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.35;
}

.intro dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.intro div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.intro dt {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
}

.intro dd {
  margin: 0;
  align-self: end;
  color: var(--muted);
}

.works-section,
.services,
.contact {
  padding: clamp(56px, 9vw, 112px) var(--gutter);
}

.works-section {
  background: var(--panel);
  color: var(--panel-text);
}

.works-section .section-heading p {
  color: rgba(246, 240, 230, 0.74);
}

.section-heading {
  max-width: var(--max);
  margin: 0 auto clamp(28px, 5vw, 58px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: var(--max);
  margin: 0 auto 28px;
}

.works-section .filter-button {
  border-color: rgba(246, 240, 230, 0.48);
  color: var(--panel-text);
}

.works-section .filter-button.active {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
}

.work-item {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: #393a40;
}

.work-item:nth-child(1),
.work-item:nth-child(6) {
  grid-column: span 7;
  min-height: 520px;
}

.work-item:nth-child(2),
.work-item:nth-child(5) {
  grid-column: span 5;
  min-height: 520px;
}

.work-item:nth-child(3),
.work-item:nth-child(4) {
  grid-column: span 6;
}

.work-item img {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-item:hover img {
  transform: scale(1.04);
}

.work-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 56px 22px 20px;
  background: linear-gradient(to top, rgba(32, 36, 44, 0.82), transparent);
  color: var(--panel-text);
}

.work-caption strong {
  font-size: clamp(20px, 2vw, 28px);
}

.work-caption span {
  color: rgba(246, 240, 230, 0.82);
  font-size: 14px;
}

.services {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-grid article {
  min-height: 300px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--paper);
}

.service-grid span {
  display: inline-block;
  margin-bottom: 56px;
  color: var(--accent);
  font-weight: 900;
}

.service-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 7vw, 96px);
  padding: clamp(64px, 10vw, 128px) var(--gutter);
  background: var(--accent-soft);
}

.about > * {
  max-width: 560px;
}

.contact-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  border: 1px solid var(--line);
}

.contact-panel div {
  min-height: 150px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.contact-panel div:last-child {
  border-right: 0;
}

.contact-panel span {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
}

.contact-panel strong {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.35;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px var(--gutter);
  background: var(--ink);
  color: var(--panel-text);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .intro,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-image {
    min-height: 430px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .service-grid,
  .contact-panel {
    grid-template-columns: 1fr 1fr;
  }

  .work-item,
  .work-item:nth-child(n) {
    grid-column: span 6;
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .hero-copy {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 64px);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .intro div {
    display: grid;
  }

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

  .work-item,
  .work-item:nth-child(n) {
    grid-column: auto;
    min-height: 360px;
  }

  .service-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-panel div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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