:root {
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  color: #27231f;
  background: #f2eee6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(117, 81, 42, 0.035) 1px, transparent 1px),
    #f2eee6;
  background-size: 100% 32px;
}

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

.site-header,
.intro,
.gallery,
footer {
  width: min(92rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(39, 35, 31, 0.18);
}

.brand {
  color: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-header p {
  margin: 0;
  color: #6f675d;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 32rem);
  align-items: end;
  gap: 3rem;
  min-height: 64vh;
  padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 9vw, 7rem);
}

.eyebrow {
  grid-column: 1 / -1;
  align-self: end;
  margin: 0 0 -1.75rem;
  color: #9a572d;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.lead {
  margin: 0 0 0.65rem;
  color: #625a50;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 2;
}

.gallery {
  column-count: 3;
  column-gap: clamp(0.8rem, 1.6vw, 1.5rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.photo {
  display: block;
  width: 100%;
  margin: 0 0 clamp(0.8rem, 1.6vw, 1.5rem);
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  border: 0;
  border-radius: 2px;
  background: #ded6c9;
  cursor: zoom-in;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.001);
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1), filter 500ms ease;
}

.photo:hover img {
  transform: scale(1.025);
  filter: saturate(0.92) contrast(1.03);
}

.photo:focus-visible {
  outline: 3px solid #a3592d;
  outline-offset: 4px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(39, 35, 31, 0.18);
  color: #6f675d;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

footer p {
  margin: 0;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(17, 15, 13, 0.96);
  color: #f8f4ed;
}

.lightbox::backdrop {
  background: rgba(17, 15, 13, 0.96);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 5rem;
  align-items: center;
}

.lightbox figure {
  display: grid;
  place-items: center;
  gap: 0.9rem;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 2rem 0 1rem;
}

.lightbox__image {
  display: block;
  max-width: min(82vw, 110rem);
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.32);
}

.lightbox__count {
  color: rgba(255, 255, 255, 0.62);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.lightbox__close,
.lightbox__nav {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lightbox__close {
  position: fixed;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  font-weight: 200;
  line-height: 1;
}

.lightbox__nav {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 1.6rem;
  opacity: 0.68;
  transition: opacity 180ms ease;
}

.lightbox__nav:hover,
.lightbox__nav:focus-visible,
.lightbox__close:hover,
.lightbox__close:focus-visible {
  opacity: 1;
  outline: none;
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 1.5rem;
  }

  .eyebrow {
    margin-bottom: 0;
  }

  .lead {
    max-width: 36rem;
  }

  .gallery {
    column-count: 2;
  }

  .lightbox[open] {
    grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem;
  }

  .lightbox__image {
    max-width: calc(100vw - 7rem);
  }
}

@media (max-width: 560px) {
  .site-header,
  .intro,
  .gallery,
  footer {
    width: min(100% - 1.5rem, 92rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .intro {
    min-height: 72vh;
    padding: 4rem 0;
  }

  .gallery {
    column-count: 1;
  }

  footer {
    flex-direction: column;
    gap: 0.4rem;
  }

  .lightbox[open] {
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  }

  .lightbox__image {
    max-width: calc(100vw - 6rem);
  }
}

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

  .photo img {
    transition: none;
  }
}
