:root {
  --ink: #111111;
  --muted: #6d6a64;
  --line: #dedbd3;
  --paper: #fbfaf7;
  --soft: #f0eee7;
  --accent: #d7472f;
  --deep: #173b36;
  --max: 1680px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  text-rendering: geometricPrecision;
}

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

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

button {
  color: inherit;
  font: inherit;
}

.cursor-line {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px clamp(18px, 3vw, 48px);
  background: rgba(251, 250, 247, 0.82);
  backdrop-filter: blur(18px);
  transition: padding 0.2s ease;
}

.site-header.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand img {
  width: 116px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
}

.main-nav a::after,
.text-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}

.main-nav a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 74px) clamp(18px, 3vw, 48px) clamp(34px, 5vw, 64px);
}

.hero-kicker,
.section-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  align-self: center;
  max-width: 1280px;
  margin: 7vh 0;
  font-size: clamp(52px, 10vw, 164px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--accent);
  white-space: nowrap;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(280px, 620px) auto;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.hero-foot p,
.section-head p,
.statement-copy p,
.studio-copy p,
.contact-info p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.75;
}

.text-link {
  position: relative;
  width: max-content;
  padding-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
}

.statement,
.work-section,
.services,
.studio,
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 140px) clamp(18px, 3vw, 48px);
}

.statement-grid,
.studio-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(36px, 8vw, 130px);
  margin-top: 28px;
}

.lead,
.studio h2,
.contact h2,
.section-head h2 {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 92px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.statement-copy,
.studio-copy {
  display: grid;
  gap: 24px;
  align-content: start;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(320px, 960px) minmax(240px, 430px);
  gap: 48px;
  align-items: end;
}

.section-head h2 {
  margin-top: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 44px 0 28px;
}

.filter {
  min-height: 36px;
  padding: 0 15px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

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

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 7vw, 118px) clamp(28px, 5vw, 72px);
  align-items: start;
}

.project-card {
  min-width: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.project-card.is-wide {
  grid-column: auto;
}

.project-card.is-hidden {
  display: none;
}

.project-image {
  aspect-ratio: 16 / 11;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
  border-radius: 4px;
}

.project-card.is-wide .project-image {
  aspect-ratio: 16 / 11;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.project-card:hover .project-image img {
  opacity: 0.92;
  filter: saturate(0.96);
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 14px;
  padding-top: 0;
}

.project-meta h3 {
  margin: 0;
  font-size: clamp(19px, 1.6vw, 28px);
  font-weight: 500;
  line-height: 1.2;
}

.project-meta p,
.project-meta span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
  margin-top: 34px;
}

.service-list article {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
  padding: clamp(20px, 2vw, 34px);
}

.service-list span {
  color: var(--accent);
  font-size: 13px;
}

.service-list h3 {
  margin: auto 0 18px;
  font-size: clamp(24px, 2.2vw, 38px);
  font-weight: 500;
  line-height: 1.05;
}

.service-list p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.contact {
  border-bottom: 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 48px;
  min-height: 42vh;
  align-items: end;
}

.contact h2 {
  margin-top: 24px;
}

.contact-info {
  display: grid;
  gap: 8px;
  padding-top: 22px;
}

.contact-info a {
  width: max-content;
  font-size: clamp(22px, 2.4vw, 42px);
  line-height: 1.08;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px clamp(18px, 3vw, 48px);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}

.site-footer span:nth-child(2) {
  text-align: center;
}

.site-footer span:nth-child(3) {
  text-align: right;
}

.case-dialog {
  width: min(1720px, calc(100vw - 18px));
  max-height: calc(100vh - 18px);
  padding: 0;
  background: var(--paper);
  border: 0;
  color: var(--ink);
}

.case-dialog::backdrop {
  background: rgba(17, 17, 17, 0.62);
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 3;
  float: right;
  margin: 14px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 13px;
}

.dialog-body {
  clear: both;
}

.case-hero {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(42px, 6vw, 104px) clamp(24px, 5vw, 104px) clamp(60px, 9vw, 150px);
}

.case-title {
  position: sticky;
  top: 68px;
  align-self: start;
}

.case-title h2 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 6vw, 92px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

.case-english {
  max-width: 560px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.55;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.case-tags span {
  padding: 6px 10px;
  background: var(--soft);
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.case-text {
  display: grid;
  gap: 24px;
}

.case-text article {
  padding-top: 0;
}

.case-text h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.case-text p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.76;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: clamp(72px, 10vw, 174px) clamp(22px, 4vw, 68px);
  padding: clamp(42px, 6vw, 104px) clamp(24px, 5vw, 104px) clamp(92px, 13vw, 210px);
  background: var(--paper);
}

.magazine-frame {
  margin: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 4px;
  overflow: visible;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.magazine-frame.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.magazine-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  filter: saturate(0.96);
  transition: opacity 0.45s ease, filter 0.45s ease;
}

.magazine-frame:hover img {
  opacity: 1;
  filter: saturate(1);
}

.frame-0 {
  grid-column: 1 / -1;
}

.frame-1 {
  grid-column: 1 / span 5;
}

.frame-2 {
  grid-column: 7 / span 6;
  margin-top: clamp(34px, 5vw, 92px);
}

.frame-3 {
  grid-column: 2 / span 9;
}

.frame-4 {
  grid-column: 8 / span 5;
  margin-top: clamp(22px, 4vw, 70px);
}

.frame-5 {
  grid-column: 1 / span 6;
}

.frame-6 {
  grid-column: 3 / span 8;
}

.frame-7 {
  grid-column: 7 / span 5;
  margin-top: clamp(24px, 5vw, 88px);
}

.frame-8 {
  grid-column: 1 / span 4;
}

.frame-9 {
  grid-column: 5 / span 8;
}

.case-note {
  display: grid;
  gap: 16px;
  align-self: center;
  padding: clamp(28px, 4vw, 58px);
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.case-note.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.case-note span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.case-note h3 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 58px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0;
}

.case-note p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.76;
}

.case-note .note-english {
  max-width: 760px;
  color: currentColor;
  font-size: clamp(20px, 2.3vw, 42px);
  line-height: 1.12;
}

.note-0 {
  grid-column: 2 / span 5;
  background: var(--soft);
}

.note-1 {
  grid-column: 7 / span 6;
  background: var(--ink);
  color: var(--paper);
}

.note-1 p,
.note-1 span {
  color: rgba(251, 250, 247, 0.72);
}

.note-1 .note-english {
  color: var(--paper);
}

.note-2 {
  grid-column: 3 / span 8;
  padding-right: 0;
  padding-left: 0;
}

@media (max-width: 980px) {
  .hero-foot,
  .statement-grid,
  .studio-layout,
  .section-head,
  .contact-inner,
  .case-hero {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.is-wide {
    grid-column: auto;
  }

  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-title {
    position: static;
  }

  .case-gallery {
    gap: clamp(42px, 7vw, 84px) clamp(18px, 3vw, 34px);
  }

  .frame-0,
  .frame-1,
  .frame-2,
  .frame-3,
  .frame-4,
  .frame-5,
  .frame-6,
  .frame-7,
  .frame-8,
  .frame-9,
  .case-note {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

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

  .brand img {
    width: 96px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
    max-width: 230px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero h1 {
    font-size: clamp(46px, 14vw, 82px);
  }

  .lead,
  .studio h2,
  .contact h2,
  .section-head h2 {
    font-size: clamp(34px, 10vw, 62px);
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project-card {
    display: block;
    margin-bottom: 0;
  }

  .project-card.is-hidden {
    display: none;
  }

  .project-image {
    aspect-ratio: 4 / 3;
  }

  .service-list,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .service-list article {
    min-height: 220px;
  }

  .site-footer span,
  .site-footer span:nth-child(2),
  .site-footer span:nth-child(3) {
    text-align: left;
  }
}
