@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --ink: #181916;
  --paper: #f3f1ea;
  --line: #cbc9c0;
  --lime: #d9df83;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  color: inherit;
}

.site-header {
  height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.brand {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -2px;
  text-decoration: none;
}
.brand sup,
footer sup {
  font-size: 9px;
  vertical-align: top;
  margin-left: 3px;
}
.main-nav {
  display: flex;
  gap: 34px;
}
.main-nav a {
  text-decoration: none;
  font-size: 13px;
  position: relative;
}
.main-nav a.active:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  left: 50%;
  bottom: -12px;
}
.submit-button {
  justify-self: end;
  border: 0;
  background: var(--lime);
  height: 44px;
  padding: 0 17px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.submit-button span {
  margin-left: 16px;
}

.intro {
  min-height: 390px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: end;
  padding: 64px 42px 58px;
}
.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.intro h1 {
  grid-column: 2;
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(74px, 9vw, 138px);
  line-height: 0.76;
  font-weight: 400;
  letter-spacing: -0.055em;
}
.intro h1 em {
  color: #b2b7a1;
}
.intro-copy {
  grid-column: 3;
  max-width: 255px;
  margin: 0 0 8px 20px;
  font-size: 13px;
  line-height: 1.55;
}

.controls {
  min-height: 74px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 12px 42px;
  gap: 20px;
}
.search-wrap {
  width: 260px;
  height: 48px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
}
.search-wrap svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  margin-right: 10px;
}
.search-wrap input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 200px;
  font-size: 13px;
}
.search-wrap input::placeholder {
  color: #77786f;
}
.filters {
  display: flex;
  gap: 7px;
  flex: 1;
  overflow: auto;
}
.filter {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 30px;
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.filter.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.view-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 38px 18px;
  padding: 38px 42px 92px;
}
.card {
  grid-column: span 4;
}
.card-2,
.card-5 {
  margin-top: 64px;
}
.card-image {
  width: 100%;
  height: 420px;
  padding: 0;
  border: 0;
  background: #ddd;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.card-2 .card-image,
.card-5 .card-image {
  height: 355px;
}
.card-3 .card-image {
  height: 490px;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.card-image:hover img {
  transform: scale(1.025);
}
.card-number {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: white;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  background: rgba(0, 0, 0, 0.08);
}
.view-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: var(--paper);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 9px 0 12px;
  font-size: 11px;
  opacity: 0;
  transform: translateY(5px);
  transition: 0.25s;
}
.card-image:hover .view-label {
  opacity: 1;
  transform: none;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 12px;
}
.card-meta h2 {
  margin: 0 0 3px;
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  font-weight: 400;
}
.card-meta p,
.card-meta > span {
  margin: 0;
  font-size: 10px;
  color: #686960;
}
.card-meta > span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 5px;
}
.loading,
.empty-state {
  grid-column: 1/-1;
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}
.empty-state h2 {
  font-family: "Instrument Serif", serif;
  font-size: 42px;
  margin: 0 0 8px;
}
.empty-state p {
  color: #77786f;
}
.gallery.compact {
  grid-template-columns: repeat(12, 1fr);
}
.gallery.compact .card {
  grid-column: span 3;
}
.gallery.compact .card-image {
  height: 270px;
}

.collections {
  border-top: 1px solid var(--line);
  padding: 76px 42px 90px;
}
.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: end;
  margin-bottom: 36px;
}
.section-heading h2 {
  grid-column: 2;
  font-family: "Instrument Serif", serif;
  font-size: 72px;
  margin: 0;
  font-weight: 400;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.collection-art {
  height: 330px;
  position: relative;
  overflow: hidden;
}
.collection-art:before,
.collection-art:after {
  content: "";
  position: absolute;
}
.art-one {
  background: #b9bfa2;
}
.art-one:before {
  width: 56%;
  height: 75%;
  background: #e9dfc4;
  border-radius: 50% 50% 3% 3%;
  left: 22%;
  bottom: -8%;
}
.art-one:after {
  width: 44%;
  height: 44%;
  border: 1px solid #6f765c;
  border-radius: 50%;
  left: 28%;
  top: 20%;
}
.art-two {
  background: #d69b83;
}
.art-two:before {
  width: 38%;
  height: 70%;
  background: #31322d;
  transform: rotate(24deg);
  left: 32%;
  top: 18%;
}
.art-two:after {
  width: 46%;
  height: 46%;
  border: 8px solid #eccab3;
  border-radius: 50%;
  right: -12%;
  bottom: -12%;
}
.art-three {
  background: #9caed0;
}
.art-three:before {
  width: 65%;
  height: 65%;
  background: #e8ca58;
  left: 17%;
  top: 17%;
  transform: rotate(45deg);
}
.art-three:after {
  width: 25%;
  height: 25%;
  background: #efede4;
  border-radius: 50%;
  left: 38%;
  top: 38%;
}
.collection-art span {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}
.collection-grid h3 {
  margin: 12px 0 3px;
  font-family: "Instrument Serif", serif;
  font-size: 24px;
  font-weight: 400;
}
.collection-grid p {
  margin: 0;
  font-size: 10px;
  color: #77786f;
}

footer {
  height: 130px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 42px;
}
footer > span {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -1.5px;
}
footer p {
  font-size: 11px;
}
footer a {
  justify-self: end;
  font-size: 11px;
  text-decoration: none;
}

dialog {
  border: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  max-height: 90vh;
}
dialog::backdrop {
  background: rgba(24, 25, 22, 0.58);
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  z-index: 5;
  right: 18px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  font-size: 21px;
}
#detailDialog {
  width: min(980px, calc(100% - 40px));
}
#detailContent {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: 600px;
}
.detail-image {
  background: #ddd;
}
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-copy {
  padding: 80px 48px 42px;
}
.detail-copy h2 {
  font-family: "Instrument Serif", serif;
  font-size: 58px;
  line-height: 0.95;
  margin: 30px 0 8px;
}
.detail-copy .creator {
  font-size: 12px;
}
.detail-copy .description {
  margin-top: 70px;
  line-height: 1.65;
  font-size: 13px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}
.detail-actions a,
.detail-actions button {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: transparent;
  text-decoration: none;
  font-size: 12px;
  padding: 0 14px;
}
.detail-actions button {
  flex: 1;
  justify-content: space-between;
}
#submitDialog {
  width: min(570px, calc(100% - 40px));
}
#submitDialog form {
  padding: 54px 56px 42px;
}
#submitDialog h2 {
  font-family: "Instrument Serif", serif;
  font-size: 48px;
  font-weight: 400;
  margin: 10px 0 28px;
}
#submitDialog label {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 16px;
}
#submitDialog input,
#submitDialog select,
#submitDialog textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  outline: 0;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
}
.form-submit {
  margin-top: 28px;
  width: 100%;
}

@media (max-width: 800px) {
  .site-header {
    height: 68px;
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }
  .main-nav {
    display: none;
  }
  .submit-button {
    height: 40px;
  }
  .intro {
    min-height: 330px;
    grid-template-columns: 1fr;
    padding: 48px 20px 40px;
  }
  .intro .eyebrow {
    align-self: start;
  }
  .intro h1 {
    grid-column: 1;
    font-size: 76px;
    align-self: end;
  }
  .intro-copy {
    grid-column: 1;
    max-width: 240px;
    margin: 24px 0 0;
    justify-self: end;
  }
  .controls {
    padding: 10px 20px;
    flex-wrap: wrap;
  }
  .search-wrap {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .filters {
    flex: 1;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    padding: 24px 20px 60px;
    gap: 28px 10px;
  }
  .card,
  .gallery.compact .card {
    grid-column: span 1;
  }
  .card-2,
  .card-5 {
    margin-top: 35px;
  }
  .card-image,
  .card-2 .card-image,
  .card-3 .card-image,
  .card-5 .card-image,
  .gallery.compact .card-image {
    height: 270px;
  }
  .card-meta {
    display: block;
  }
  .card-meta > span {
    display: block;
    margin-top: 5px;
  }
  .collections {
    padding: 58px 20px;
  }
  .section-heading {
    grid-template-columns: 1fr;
  }
  .section-heading h2 {
    grid-column: 1;
    font-size: 58px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .collection-art {
    height: 300px;
  }
  footer {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }
  footer p {
    display: none;
  }
  #detailContent {
    grid-template-columns: 1fr;
  }
  .detail-image {
    height: 300px;
  }
  .detail-copy {
    padding: 40px 24px 30px;
  }
  .detail-copy h2 {
    font-size: 46px;
  }
  .detail-copy .description {
    margin-top: 40px;
  }
  #submitDialog form {
    padding: 48px 24px 30px;
  }
}
