@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&display=swap");

:root {
  --paper: #f4f1e8;
  --ink: #151510;
  --soft-ink: #565246;
  --line: #d5cebf;
  --moss: #5f6f35;
  --clay: #aa6544;
  --black: #0d0d0a;
  --sans: "Satoshi", Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.25;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23grain)' opacity='.18'/%3E%3C/svg%3E");
  opacity: 0.2;
  mix-blend-mode: multiply;
}

a,
button {
  color: inherit;
}

video {
  max-width: 100%;
}

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
  pointer-events: none;
  animation: intro-shell 1.8s ease forwards;
}

.intro-loader::before,
.intro-loader::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    linear-gradient(90deg, rgba(244, 241, 232, 0.035), transparent 28%),
    var(--black);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.45);
}

.intro-loader::before {
  left: 0;
  animation: intro-left 760ms cubic-bezier(0.82, 0, 0.18, 1) 1010ms forwards;
}

.intro-loader::after {
  right: 0;
  animation: intro-right 760ms cubic-bezier(0.82, 0, 0.18, 1) 1010ms forwards;
}

.intro-mark {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  animation: intro-mark 1.2s ease forwards;
}

.intro-mark img {
  width: 128px;
  height: 86px;
  display: block;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.1);
}

.intro-mark span,
.intro-mark p {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
}

.intro-mark span {
  font-size: 0.96rem;
}

.intro-mark p {
  color: rgba(244, 241, 232, 0.68);
  font-size: 0.74rem;
}

.intro-loader.is-done {
  display: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 26px;
  padding: 14px 20px 0;
  background: transparent;
  border-bottom: 0;
  pointer-events: none;
}

.brand,
.site-header nav,
.section-kicker,
.work-role,
.preview p {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.brand,
.site-header a {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  height: auto;
  overflow: hidden;
  color: var(--ink);
  pointer-events: auto;
}

.brand img {
  width: 128px;
  height: 86px;
  margin-right: -34px;
  display: block;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.08);
}

.brand span {
  max-width: none;
  color: rgba(244, 241, 232, 0.86);
  font-size: 0.88rem;
  line-height: 1.25;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 1.48rem;
  line-height: 1.05;
  color: rgba(244, 241, 232, 0.9);
  pointer-events: auto;
}

.site-header a:hover {
  color: var(--moss);
}

.site-header-dark .brand span,
.site-header-dark nav {
  color: var(--ink);
}

@keyframes intro-mark {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  28%,
  64% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@keyframes intro-left {
  to {
    transform: translateX(-100%);
  }
}

@keyframes intro-right {
  to {
    transform: translateX(100%);
  }
}

@keyframes intro-shell {
  0%,
  96% {
    visibility: visible;
  }

  100% {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-loader {
    animation: intro-shell 1ms ease forwards;
  }

  .intro-loader::before,
  .intro-loader::after,
  .intro-mark {
    animation: none;
  }
}

main {
  padding: 0 28px 72px;
}

.archive-main {
  padding-top: 104px;
}

.opening {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  margin: 0 -28px;
  padding: 0 28px 58px;
  background: var(--black);
  color: var(--paper);
}

.opening video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.9) contrast(1.04);
}

.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 38%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent 48%);
  pointer-events: none;
}

.opening-copy {
  position: relative;
  z-index: 1;
}

.opening h1 {
  margin: 0;
  max-width: none;
  color: var(--paper);
  font-size: 12.5rem;
  line-height: 0.78;
  letter-spacing: 0;
}

.opening p {
  margin: 18px 0 0 16px;
  color: rgba(244, 241, 232, 0.82);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
}

.work {
  padding-top: 28px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 42px 28px;
}

.project-card {
  width: 100%;
  transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.project-media {
  position: relative;
}

.project-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: var(--black);
  filter: saturate(0.92) contrast(1.03);
  cursor: pointer;
}

.project-action {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-card:hover .project-action,
.project-card:focus-within .project-action,
.project-card.is-active .project-action {
  opacity: 1;
  pointer-events: auto;
}

.project-action button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.project-action button:hover,
.project-action button:focus-visible {
  color: var(--moss);
  outline: 0;
}

.work-grid.is-focused .project-card:not(.is-active) {
  filter: blur(8px);
  opacity: 0.38;
}

.work-grid.is-focused .project-card.is-active {
  transform: translateY(-2px);
}

.project-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
}

.project-caption strong,
.project-caption em,
.project-caption > span:last-child {
  display: block;
}

.project-caption strong {
  font-weight: 500;
  text-transform: uppercase;
}

.project-caption em {
  color: var(--soft-ink);
  font-style: italic;
}

.project-caption > span:last-child {
  color: var(--soft-ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-align: right;
  text-transform: uppercase;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: 42px;
  padding: 96px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 96px;
}

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(320px, 1fr);
  gap: 30px;
  min-height: 34vh;
  align-items: end;
  padding: 0 0 30px;
}

.archive-hero h1 {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 880px;
  margin-bottom: 12px;
  text-align: center;
}

.archive-hero > p:last-child {
  grid-column: 1 / 2;
  max-width: 620px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 1.3rem;
  line-height: 1.1;
}

.archive-work {
  padding-top: 8px;
}

.archive-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 92px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.archive-note p {
  margin: 0;
  color: var(--soft-ink);
}

.archive-note a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--moss);
}

h1 {
  margin: 0;
  font-size: 3.5rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.contact-note {
  max-width: 720px;
  margin: 0 0 18px;
  color: var(--soft-ink);
  font-size: 1.55rem;
  line-height: 1.1;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
}

.contact-links a,
.modal-close {
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  font: inherit;
}

.contact-links a:hover,
.modal-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 20%, rgba(244, 241, 232, 0.1), transparent 34rem),
    rgba(13, 13, 10, 0.94);
  color: var(--paper);
}

.video-modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(1680px, 100%);
  max-height: calc(100vh - 20px);
  display: grid;
  gap: 6px;
}

.modal-topline,
.modal-copy {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.modal-topline p,
.modal-copy p {
  margin: 0;
  color: #c9c0b0;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.modal-close {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-close:hover {
  background: transparent;
  color: #c9c0b0;
}

.modal-frame {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.modal-panel video {
  width: 100%;
  max-height: 90vh;
  display: block;
  background: transparent;
}

.modal-copy h1,
.modal-copy p {
  margin: 0;
}

.modal-copy h1 {
  font-size: 1.2rem;
  line-height: 1;
}

#modalRole {
  text-align: right;
}

@media (max-width: 980px) {
  .work,
  .contact,
  .archive-hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.8rem;
  }

  .work-grid {
    gap: 36px 20px;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 18px 0;
  }

  .site-header nav {
    align-items: flex-start;
    flex-direction: row;
    font-size: 1.08rem;
  }

  main {
    padding: 0 18px 54px;
  }

  .opening {
    min-height: 86vh;
    margin: 0 -18px;
    padding: 0 18px 42px;
  }

  .opening h1 {
    font-size: 5rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .work {
    padding-top: 24px;
  }

  .archive-main {
    padding-top: 102px;
  }

  .archive-hero {
    min-height: 28vh;
    padding-bottom: 28px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    margin-bottom: 42px;
  }

  .contact-note {
    font-size: 1.2rem;
  }

  .archive-hero > p:last-child {
    font-size: 1.2rem;
  }

  .archive-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-copy {
    flex-direction: column;
  }
}
