:root {
  color-scheme: light;
  --paper: #f6f4ef;
  --paper-deep: #efebe3;
  --ink: #222421;
  --muted: #6d6b64;
  --rule: #c9c4bb;
  --accent: #a44a2b;
  --accent-dark: #853a22;
  --focus: #245b92;
  --shell: 1440px;
  --content-shell: 1320px;
  --gutter: clamp(24px, 3.2vw, 52px);
  --serif: "Songti SC", "Noto Serif SC", STSong, SimSun, serif;
  --sans: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--paper-deep);
  object-fit: cover;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

svg {
  display: block;
}

.page-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--shell));
  margin-inline: auto;
}

.content-shell {
  max-width: var(--content-shell);
}

.section-rule {
  border-top: 1px solid var(--rule);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.site-header {
  height: 84px;
  border-bottom: 1px solid rgba(34, 36, 33, 0.18);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(30px, 4vw, 62px);
}

.site-nav__link,
.work-filter {
  position: relative;
}

.site-nav__link {
  padding: 12px 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.site-nav__link::after,
.work-filter::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after,
.site-nav__link.is-active::after,
.work-filter:hover::after,
.work-filter:focus-visible::after,
.work-filter.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: min(920px, calc(100svh - 84px));
  overflow: hidden;
  background: #dfe3e1;
}

.hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero__media img {
  object-position: center 52%;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  min-height: min(920px, calc(100svh - 84px));
  padding-top: clamp(92px, 12vh, 144px);
  pointer-events: none;
}

.hero__copy {
  width: min(1100px, 82vw);
  padding-left: clamp(18px, 3vw, 52px);
  pointer-events: auto;
}

.hero h1 {
  max-width: 1080px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 5.35vw, 82px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero__copy > p {
  margin: clamp(28px, 3vw, 42px) 0 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 28px);
  letter-spacing: 0.16em;
  line-height: 1.5;
}

.hero__copy > p span {
  margin-inline: 0.38em;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 220px;
  min-height: 62px;
  margin-top: clamp(30px, 3.5vw, 48px);
  padding: 0 26px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.12em;
  transition: background-color 180ms ease, transform 180ms ease;
}

.primary-link svg,
.text-link svg {
  width: 34px;
  height: 17px;
  margin-left: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.2;
  transition: transform 180ms ease;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.primary-link:hover svg,
.primary-link:focus-visible svg,
.text-link:hover svg,
.text-link:focus-visible svg {
  transform: translateX(4px);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  bottom: 28px;
  left: 50%;
  padding: 8px;
  color: #f8f6f1;
  transform: translateX(-50%);
}

.scroll-cue svg {
  width: 20px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.2;
  transition: transform 180ms ease;
}

.scroll-cue:hover svg,
.scroll-cue:focus-visible svg {
  transform: translateY(4px);
}

.work-section {
  padding-block: clamp(78px, 8vw, 118px) clamp(96px, 10vw, 142px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}

.section-heading h2,
.about h2,
.contact h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-heading h2 {
  font-size: clamp(58px, 6vw, 88px);
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: 0.02em;
}

.work-filters {
  display: flex;
  gap: clamp(26px, 3.6vw, 54px);
  padding-bottom: 1px;
}

.work-filter {
  border: 0;
  padding: 12px 0;
  background: none;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.work-filter.is-active {
  color: var(--accent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(38px, 4vw, 58px) clamp(14px, 1.4vw, 22px);
  margin-top: 52px;
}

.gallery__item {
  grid-column: span 4;
  margin: 0;
}

.gallery__item--lead {
  grid-column: span 7;
}

.gallery__item--wide {
  grid-column: span 5;
}

.gallery__item--portrait {
  grid-column: span 3;
}

.gallery__item--compact {
  grid-column: span 4;
}

.gallery__item--panorama {
  grid-column: 1 / -1;
}

.gallery.is-filtered .gallery__item:not(.is-hidden) {
  grid-column: span 6;
}

.gallery.is-filtered .gallery__item--panorama:not(.is-hidden) {
  grid-column: 1 / -1;
}

.gallery__media {
  overflow: hidden;
  background: var(--paper-deep);
}

.gallery__item--lead .gallery__media {
  aspect-ratio: 1.72 / 1;
}

.gallery__item--wide .gallery__media,
.gallery__item--compact .gallery__media {
  aspect-ratio: 1.5 / 1;
}

.gallery__item--portrait .gallery__media {
  aspect-ratio: 0.8 / 1;
}

.gallery__item--panorama .gallery__media {
  aspect-ratio: 2.35 / 1;
}

.gallery__item img {
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery__item:hover img {
  transform: scale(1.018);
}

.gallery__item figcaption {
  display: grid;
  gap: 5px;
  margin-top: 14px;
}

.gallery__item figcaption strong {
  font-family: var(--serif);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.gallery__item figcaption span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.gallery__item.is-hidden {
  display: none;
}

.gallery__item.is-entering {
  animation: gallery-in 360ms ease both;
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about {
  padding-block: clamp(76px, 8vw, 112px);
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.64fr);
  gap: clamp(54px, 6.5vw, 96px);
  align-items: center;
}

.about__copy {
  padding-left: clamp(0px, 1.5vw, 20px);
}

.about h2 {
  font-size: clamp(58px, 5.7vw, 84px);
}

.about__copy p {
  max-width: 22em;
  margin: clamp(28px, 3vw, 42px) 0 0;
  font-family: var(--serif);
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(28px, 3.2vw, 44px);
  padding: 8px 0;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.about__media {
  aspect-ratio: 1.72 / 1;
  margin: 0;
  overflow: hidden;
}

.about__media img {
  object-position: center center;
}

.contact,
.contact__inner {
  min-height: 420px;
}

.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 72px;
  text-align: center;
}

.contact h2 {
  max-width: 19em;
  font-size: clamp(45px, 4.6vw, 70px);
}

.contact .primary-link {
  margin-top: clamp(34px, 3.5vw, 50px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.site-footer p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .hero__copy {
    width: min(760px, 76vw);
    padding-left: 0;
  }

  .hero h1 {
    font-size: clamp(56px, 8vw, 78px);
  }

  .about__inner {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: 46px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }

  .site-header {
    height: 72px;
  }

  .brand {
    font-size: 22px;
    letter-spacing: 0.2em;
  }

  .site-nav {
    gap: 22px;
  }

  .site-nav__link {
    font-size: 13px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    background: var(--paper);
  }

  .hero__content {
    order: 1;
    min-height: auto;
    padding-block: 58px 48px;
  }

  .hero__copy {
    width: 100%;
  }

  .hero h1 {
    max-width: 8em;
    font-size: clamp(48px, 13.5vw, 68px);
    line-height: 1.12;
  }

  .hero__copy > p {
    margin-top: 24px;
    font-size: 17px;
  }

  .primary-link {
    width: 190px;
    min-height: 56px;
    margin-top: 30px;
    padding-inline: 22px;
    font-size: 15px;
  }

  .hero__media {
    position: relative;
    order: 2;
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .hero__media img {
    object-position: 51% center;
  }

  .scroll-cue {
    display: none;
  }

  .work-section {
    padding-block: 74px 92px;
  }

  .section-heading {
    display: block;
    padding-bottom: 26px;
  }

  .section-heading h2 {
    font-size: clamp(48px, 14vw, 66px);
  }

  .section-heading p {
    margin-top: 8px;
    font-size: 18px;
  }

  .work-filters {
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
  }

  .work-filter {
    font-size: 14px;
  }

  .gallery {
    display: block;
    margin-top: 36px;
  }

  .gallery__item + .gallery__item {
    margin-top: 42px;
  }

  .gallery__media,
  .gallery__item--lead .gallery__media,
  .gallery__item--wide .gallery__media,
  .gallery__item--compact .gallery__media,
  .gallery__item--panorama .gallery__media {
    aspect-ratio: 4 / 3;
  }

  .gallery__item--portrait .gallery__media {
    aspect-ratio: 4 / 5;
  }

  .about {
    padding-block: 74px 88px;
  }

  .about__inner {
    display: flex;
    flex-direction: column;
    gap: 46px;
    align-items: stretch;
  }

  .about h2 {
    font-size: clamp(52px, 15vw, 70px);
  }

  .about__copy p {
    max-width: none;
    font-size: 18px;
    line-height: 1.8;
  }

  .about__media {
    aspect-ratio: 4 / 3;
  }

  .contact,
  .contact__inner {
    min-height: 390px;
  }

  .contact__inner {
    padding-block: 72px;
  }

  .contact h2 {
    font-size: clamp(39px, 10.5vw, 54px);
    line-height: 1.25;
  }

  .contact h2 br {
    display: none;
  }
}

@media (max-width: 410px) {
  .site-nav {
    gap: 16px;
  }

  .site-nav__link {
    font-size: 12px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero__copy > p {
    font-size: 15px;
    letter-spacing: 0.1em;
  }

  .work-filter {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
