:root {
  --ink: #171916;
  --paper: #f5f5f1;
  --white: #fff;
  --muted: #6d716a;
  --line: #d6d8d2;
  --accent: #9d3f32;
  --sage: #65715d;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body.dialog-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: 84px;
  padding: 0 clamp(20px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  transition: background .3s, color .3s, height .3s, box-shadow .3s;
}
.site-header.scrolled { height: 68px; color: var(--ink); background: rgba(245,245,241,.94); backdrop-filter: blur(18px); box-shadow: 0 1px 0 rgba(23,25,22,.12); }
.brand { width: clamp(150px, 16vw, 210px); }
.brand img { width: 100%; filter: brightness(0) invert(1); transition: filter .3s; }
.site-header.scrolled .brand img { filter: none; }
.desktop-nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 44px); font-size: 13px; }
.desktop-nav a { position: relative; padding: 10px 0; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 4px; height: 1px; background: currentColor; transition: right .25s; }
.desktop-nav a:hover::after { right: 0; }
.menu-toggle, .mobile-nav { display: none; }

.hero { position: relative; height: min(82svh, 860px); min-height: 610px; color: var(--white); overflow: hidden; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,7,.72) 0%, rgba(7,9,7,.28) 54%, rgba(7,9,7,.08) 100%), linear-gradient(0deg, rgba(7,9,7,.24), transparent 45%); }
.hero-content { position: absolute; left: clamp(22px, 8vw, 140px); bottom: clamp(64px, 11vh, 122px); max-width: 760px; }
.hero-kicker, .section-label { margin: 0 0 20px; font-size: 11px; line-height: 1.4; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(52px, 8.5vw, 126px); line-height: .98; font-weight: 500; letter-spacing: 0; }
.hero-copy { margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 23px); line-height: 1.65; font-weight: 350; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 28px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-width: 170px; padding: 14px 16px; border: 1px solid currentColor; font-size: 13px; }
.button-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.text-link { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.6); font-size: 13px; }
.hero-index { position: absolute; right: clamp(20px, 4vw, 68px); bottom: 28px; margin: 0; font-size: 10px; letter-spacing: .16em; }

.studio-intro { padding: clamp(70px, 9vw, 130px) clamp(22px, 7vw, 120px); border-bottom: 1px solid var(--line); }
.intro-statement { display: grid; grid-template-columns: minmax(150px, .35fr) 1fr; gap: 40px; align-items: start; }
.section-label { color: var(--accent); }
.intro-statement h2, .section-heading h2, .about-copy h2, .contact-section h2 { margin: 0; font-size: clamp(34px, 4.6vw, 70px); line-height: 1.2; font-weight: 450; letter-spacing: 0; }
.metrics { margin-top: 80px; margin-left: calc(35% + 40px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.metrics div { padding: 24px 18px 0 0; border-right: 1px solid var(--line); }
.metrics div + div { padding-left: 24px; }
.metrics div:last-child { border-right: 0; }
.metrics strong { display: block; font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 400; }
.metrics span { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.projects-section { padding: clamp(72px, 9vw, 132px) clamp(16px, 4vw, 68px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 0 auto 46px; max-width: 1500px; }
.section-heading h2 { font-size: clamp(42px, 5.8vw, 82px); }
.project-filters { display: flex; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.project-filters button { border: 0; background: transparent; padding: 9px 13px; color: var(--muted); font-size: 12px; cursor: pointer; }
.project-filters button.active { color: var(--white); background: var(--ink); }
.project-grid { max-width: 1500px; margin: auto; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 3vw, 48px) clamp(14px, 2vw, 28px); }
.case-card { grid-column: span 6; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; min-width: 0; }
.case-card:nth-child(3n+1) { grid-column: span 7; }
.case-card:nth-child(3n+2) { grid-column: span 5; }
.case-image { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #e5e6e1; }
.case-card:nth-child(3n+2) .case-image { aspect-ratio: 4 / 5; }
.case-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.case-image::after { content: "查看项目 ↗"; position: absolute; right: 14px; bottom: 14px; padding: 10px 12px; color: var(--white); background: rgba(23,25,22,.78); font-size: 11px; opacity: 0; transform: translateY(8px); transition: .25s; }
.case-card:hover .case-image img { transform: scale(1.025); }
.case-card:hover .case-image::after { opacity: 1; transform: none; }
.case-info { display: flex; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--ink); margin-top: 12px; }
.case-info h3 { margin: 0; font-size: clamp(17px, 1.5vw, 23px); font-weight: 520; }
.case-info p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.case-type { flex: 0 0 auto; font-size: 10px; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }

.services-section { padding: clamp(78px, 9vw, 132px) clamp(22px, 7vw, 120px); color: var(--white); background: var(--ink); }
.section-heading.inverse { align-items: flex-start; }
.section-heading.inverse .section-label { color: #c87164; }
.section-heading.inverse p:last-child { max-width: 440px; margin: 46px 0 0; color: #bfc2bb; font-size: 14px; line-height: 1.9; }
.service-list { margin-top: 78px; border-top: 1px solid #4b4e49; }
.service-list article { display: grid; grid-template-columns: 80px minmax(180px, .8fr) 1fr; gap: 28px; align-items: baseline; padding: 34px 0; border-bottom: 1px solid #4b4e49; }
.service-list span { color: #9fa39b; font-size: 11px; }
.service-list h3 { margin: 0; font-size: clamp(24px, 2.7vw, 42px); font-weight: 420; }
.service-list p { margin: 0; max-width: 560px; color: #bfc2bb; font-size: 14px; line-height: 1.8; }

.about-section { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 760px; background: var(--white); }
.about-image-wrap { min-height: 640px; overflow: hidden; }
.about-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.about-copy { align-self: center; padding: clamp(60px, 8vw, 120px); }
.about-copy h2 { font-size: clamp(34px, 4vw, 60px); }
.about-copy > p:not(.section-label) { max-width: 620px; margin: 30px 0 0; color: var(--muted); font-size: 14px; line-height: 2; }
.underline-link { display: inline-block; margin-top: 44px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 13px; }

.contact-section { padding: clamp(90px, 12vw, 180px) clamp(22px, 8vw, 140px); background: #d9ded5; }
.contact-section h2 { max-width: 1060px; }
.contact-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: clamp(34px, 7vw, 110px); align-items: end; margin-top: 78px; padding-top: 28px; border-top: 1px solid rgba(23,25,22,.35); }
.contact-line { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 42px; }
.contact-line .contact-address { grid-column: 1 / -1; }
.contact-line span, .contact-line strong, .wechat-contact span, .wechat-contact strong, .wechat-contact small { display: block; }
.contact-line span, .wechat-contact span { color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.contact-line strong, .wechat-contact strong { font-size: 15px; font-weight: 500; line-height: 1.8; }
.contact-line a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.wechat-contact { margin: 0; }
.wechat-contact img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--white); }
.wechat-contact figcaption { padding-top: 12px; }
.wechat-contact small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.site-footer { min-height: 130px; padding: 30px clamp(22px, 4vw, 68px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; background: var(--white); border-top: 1px solid var(--line); }
.site-footer img { width: 170px; }
.site-footer p, .site-footer a { font-size: 11px; color: var(--muted); }
.site-footer a { justify-self: end; }

.case-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: var(--white); background: #101210; }
.case-dialog::backdrop { background: rgba(0,0,0,.8); }
.dialog-toolbar { height: 92px; padding: 18px clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #3b3e39; }
.dialog-toolbar p { margin: 0 0 5px; color: #a9ada5; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.dialog-toolbar h2 { margin: 0; font-size: 22px; font-weight: 500; }
.dialog-toolbar button { width: 44px; height: 44px; border: 1px solid #555952; background: transparent; color: var(--white); font-size: 26px; cursor: pointer; }
.dialog-stage { position: relative; height: calc(100dvh - 182px); display: grid; place-items: center; overflow: hidden; }
.dialog-stage img { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow { position: absolute; z-index: 2; top: 50%; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.45); background: rgba(16,18,16,.62); color: var(--white); cursor: pointer; }
.gallery-arrow.prev { left: 18px; }
.gallery-arrow.next { right: 18px; }
.dialog-footer { height: 90px; padding: 12px clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #3b3e39; }
.thumbnail-list { display: flex; gap: 8px; min-width: 0; overflow-x: auto; }
.thumbnail-list button { flex: 0 0 72px; height: 50px; padding: 0; border: 1px solid transparent; background: transparent; opacity: .55; cursor: pointer; }
.thumbnail-list button.active { border-color: var(--white); opacity: 1; }
.thumbnail-list img { width: 100%; height: 100%; object-fit: cover; }
.dialog-footer p { flex: 0 0 auto; margin: 0; color: #a9ada5; font-size: 11px; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
  .menu-toggle span { display: block; width: 24px; height: 1px; background: currentColor; transition: transform .25s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .mobile-nav { position: fixed; inset: 68px 0 auto; padding: 14px 22px 24px; display: grid; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); transform: translateY(-140%); opacity: 0; transition: .25s; }
  .mobile-nav.open { transform: none; opacity: 1; }
  .mobile-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .intro-statement { grid-template-columns: 1fr; gap: 4px; }
  .metrics { margin-left: 0; }
  .about-section { grid-template-columns: 1fr; }
  .about-image-wrap { height: 64vw; min-height: 420px; }
  .contact-layout { grid-template-columns: minmax(0,1fr) 220px; }
}

@media (max-width: 640px) {
  .site-header { height: 70px; padding-left: 18px; padding-right: 14px; }
  .site-header.scrolled { height: 62px; }
  .brand { width: 148px; }
  .mobile-nav { top: 62px; }
  .hero { height: 78svh; min-height: 590px; }
  .hero-shade { background: linear-gradient(0deg, rgba(7,9,7,.7), rgba(7,9,7,.12) 75%); }
  .hero-image { object-position: 58% center; }
  .hero-content { left: 20px; right: 20px; bottom: 58px; }
  .hero h1 { font-size: clamp(46px, 15vw, 70px); }
  .hero-copy { margin-top: 20px; font-size: 16px; }
  .hero-actions { margin-top: 26px; gap: 18px; }
  .button { min-width: 144px; gap: 16px; padding: 12px 13px; }
  .hero-index { display: none; }
  .studio-intro { padding: 66px 20px; }
  .intro-statement h2 { font-size: 31px; }
  .metrics { grid-template-columns: 1fr; margin-top: 48px; }
  .metrics div { display: grid; grid-template-columns: 84px 1fr; align-items: end; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics div + div { padding-left: 0; }
  .metrics strong { font-size: 44px; }
  .metrics span { margin: 0 0 5px; }
  .projects-section { padding: 66px 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 30px; }
  .section-heading h2 { font-size: 48px; }
  .project-filters { width: 100%; overflow-x: auto; }
  .project-filters button { flex: 1 0 auto; }
  .project-grid { grid-template-columns: 1fr; gap: 42px; }
  .case-card, .case-card:nth-child(3n+1), .case-card:nth-child(3n+2) { grid-column: auto; }
  .case-card:nth-child(3n+2) .case-image, .case-image { aspect-ratio: 4 / 3; }
  .case-image::after { display: none; }
  .services-section { padding: 68px 20px; }
  .section-heading.inverse p:last-child { margin-top: 0; }
  .service-list { margin-top: 42px; }
  .service-list article { grid-template-columns: 42px 1fr; gap: 12px; padding: 26px 0; }
  .service-list p { grid-column: 2; }
  .about-image-wrap { min-height: 340px; height: 86vw; }
  .about-copy { padding: 66px 20px; }
  .about-copy h2 { font-size: 34px; }
  .contact-section { padding: 76px 20px; }
  .contact-section h2 { font-size: 38px; }
  .contact-layout { grid-template-columns: 1fr; margin-top: 52px; gap: 36px; }
  .contact-line { grid-template-columns: 1fr; gap: 26px; }
  .contact-line .contact-address { grid-column: auto; }
  .wechat-contact { width: min(100%, 260px); }
  .site-footer { grid-template-columns: 1fr auto; padding: 28px 20px; }
  .site-footer p { grid-column: 1 / -1; order: 3; }
  .site-footer img { width: 145px; }
  .dialog-toolbar { height: 78px; padding: 12px 14px; }
  .dialog-toolbar h2 { font-size: 18px; }
  .dialog-stage { height: calc(100dvh - 148px); }
  .dialog-footer { height: 70px; padding: 10px 14px; }
  .thumbnail-list button { flex-basis: 54px; height: 40px; }
  .gallery-arrow { top: auto; bottom: 14px; }
  .gallery-arrow.prev { left: 14px; }
  .gallery-arrow.next { right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
