@import url('./shared/icons.css');

@font-face {
  font-family: Barlow;
  src: url('./assets/fonts/HTxwL3I-JCGChYJ8VI-L6OO_au7B46r2_3E.ttf');
}
@font-face {
  font-family: Playfair;
  src: url('./assets/fonts/nuFRD-vYSZviVYUb_rj3ij__anPXDTnCjmHKM4nYO7KN_k-UbtY.ttf');
  font-style: italic;
}
@font-face {
  font-family: Mono;
  src: url('./assets/fonts/aFTU7PB1QTsUX8KYhh0.ttf');
}
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #252b29;
  background: #f5f5f0;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #e36539;
  outline-offset: 5px;
}
::selection {
  background: #d9ed86;
}
.site-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4.5vw;
  border-bottom: 1px solid #d9dcd5;
  gap: 24px;
}
.wordmark {
  font-family: Barlow, Arial, sans-serif;
  font-size: 28px;
  letter-spacing: -1.2px;
  text-decoration: none;
  font-weight: 700;
}
.wordmark > span:not(.edition) {
  color: #e86d3e;
}
.edition {
  font: 11px Arial;
  vertical-align: top;
  display: inline-block;
  margin: 6px 0 0 5px;
  letter-spacing: 0;
}
.header-note,
.source-link {
  font:
    12px Mono,
    monospace;
}
.source-link {
  text-decoration: none;
}
.source-link:hover {
  text-decoration: underline;
}
main {
  margin: 0 4.5vw;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  padding: 55px 0 48px;
}
.eyebrow {
  font:
    11px Mono,
    monospace;
  letter-spacing: 1.2px;
  color: #626a62;
}
h1 {
  font-weight: 500;
  font-size: clamp(45px, 6.8vw, 108px);
  line-height: 1.1;
  letter-spacing: -0.065em;
  margin: 17px 0 0;
}
h1 em {
  font-family: Playfair, serif;
  font-weight: 700;
}
.intro p {
  color: #686e66;
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 5px;
}
.gallery-label {
  display: flex;
  justify-content: space-between;
  font:
    11px Mono,
    monospace;
  letter-spacing: 1px;
  border-top: 1px solid #d9dcd5;
  padding: 20px 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 22px;
  padding-bottom: 80px;
}
.project-card {
  display: block;
  min-width: 0;
  text-decoration: none;
  position: relative;
}
.preview {
  width: 100%;
  aspect-ratio: 1.26;
  background: var(--card-bg);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s;
}
.preview .index {
  position: absolute;
  top: 19px;
  left: 20px;
  font:
    12px Mono,
    monospace;
  color: #70776b;
  z-index: 2;
}
.open-icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  height: 44px;
  width: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #252b2920;
  border-radius: 50%;
  color: #252b29;
  background: #ffffffd9;
  transition:
    background 0.2s,
    color 0.2s;
}
.open-icon .arrow-icon {
  width: 22px;
  height: 22px;
}
.project-card:focus-visible .open-icon {
  background: #252b29;
  color: white;
}
@media (hover: hover) and (pointer: fine) {
  .project-card:hover .open-icon {
    background: #252b29;
    color: white;
  }
}
.card-meta {
  position: relative;
  z-index: 2;
  padding-top: 18px;
}
.card-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card-meta h2 {
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.65px;
  margin: 0;
}
.card-meta .category {
  font:
    10px Mono,
    monospace;
  color: #6a736b;
  text-transform: uppercase;
  text-align: right;
  letter-spacing: 0.25px;
}
.card-meta p {
  color: #747b72;
  font-size: 13px;
  margin: 8px 0 0;
}
.preview-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  visibility: hidden;
}
.preview.is-ready .preview-canvas {
  visibility: visible;
}
.preview .preview-error {
  position: absolute;
  left: 20px;
  bottom: 24px;
  font-size: 12px;
  color: #5a635a;
  max-width: 70%;
  z-index: 2;
}
footer {
  margin: 0 4.5vw;
  padding: 26px 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #d9dcd5;
  font:
    11px Mono,
    monospace;
  color: #6d756b;
}
footer a {
  text-decoration: none;
}
noscript {
  display: block;
  padding: 32px;
}
.preview-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px;
  border: 2px solid #242b2726;
  border-top-color: #242b27;
  border-radius: 50%;
  pointer-events: none;
  animation: preview-spin 0.9s linear infinite paused;
}
body:not(.webgl-ready) .preview-loader,
.preview.is-visible .preview-loader {
  animation-play-state: running;
}
.preview-loader > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@keyframes preview-spin {
  to {
    transform: rotate(1turn);
  }
}
@media (min-width: 1800px) {
  main,
  .site-header,
  footer {
    max-width: 1660px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 1000px) {
  .header-note {
    display: none;
  }
  .intro {
    display: block;
  }
  .intro p {
    margin-top: 22px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-meta .category {
    font-size: 9px;
  }
}
@media (max-width: 600px) {
  .site-header {
    height: 78px;
    margin: 0 22px;
  }
  main,
  footer {
    margin: 0 22px;
  }
  .intro {
    padding: 36px 0;
  }
  h1 {
    font-size: 48px;
  }
  .gallery {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .preview {
    aspect-ratio: 1.3;
  }
  .open-icon {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }
  .open-icon .arrow-icon {
    width: 24px;
    height: 24px;
  }
  .card-meta .category {
    font-size: 10px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 10px;
  }
  .source-link {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .preview-loader {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
