@font-face {
  font-family: Latitude;
  src: url('latitude-regular-webfont.woff2') format('woff2');
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f4ef;
  color: #252a25;
  font-family: Latitude, system-ui, sans-serif;
}

header {
  max-width: 1440px;
  margin: auto;
  padding: 0.5em 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #dfdfd5;
}

.brand {
  font-size: 1.35em;
  text-decoration: none;
  color: inherit;
}

.brand small {
  font-family: sans-serif;
  padding-right: 1em;
}

.brand span {
  color: #7b8968;
}

button:hover {
  cursor: pointer;
}

button:focus-visible {
  outline: 0;
}

main {
  max-width: 1440px;
  margin: auto;
  padding: 0.5em 5%;
}

.gallery {
  columns: 3;
  column-gap: 20px;
}

.card {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  margin: 0 0 0.5em;
  background: #e6e5df;
  break-inside: avoid;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s;
}

.card:hover img {
  transform: scale(1.025);
}

#status {
  text-align: center;
  color: #7a7d70;
  padding: 2em 0;
}

#more {
  display: block;
  margin: auto;
}

#more[hidden] {
  display: none;
}

dialog {
  border: 0;
  padding: 0;
  max-width: min(450px, 94vw);
  background: #f6f4ef;
  color: inherit;
}

dialog::backdrop {
  background: #172019b3;
  backdrop-filter: blur(4px);
}

.close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  appearance: none;
  background-color: transparent;
  border: none;
  font-size: 1.2em;
  font-family: monospace, system-ui, sans-serif;
  line-height: 1;
  padding: 0 2px 0 0;
  width: 100%;
}

.close:hover {
  color: #7b8968;
}

#viewer {
  max-width: 96vw;
  max-height: 95dvh;
  padding: 0;
  background: #f6f4ef;
}

#viewer img {
  display: block;
  max-width: 90vw;
  max-height: 80dvh;
  object-fit: contain;
}

@media (max-width: 750px) {
  .gallery {
    columns: 2;
    column-gap: 12px;
  }

  .card {
    margin-bottom: 12px;
  }

  .intro {
    padding-top: 40px;
  }

  header {
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
