:root {
  --ink: #090909;
  --paper: #f3f1eb;
  --muted: rgba(255, 255, 255, .66);
  --edge: 18px;
  --pad: clamp(15px, 1.8vw, 30px);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--paper);
  background: var(--ink);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--ink); }

body {
  min-width: 320px;
  overflow: hidden;
  text-transform: uppercase;
}

button, a {
  font: inherit;
  touch-action: manipulation;
}

button {
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  pointer-events: none;
  mix-blend-mode: difference;
}

.site-header > * { pointer-events: auto; }

.header-role,
.back-button,
.site-nav,
.overview-count,
.overview-prompt,
.project-counter,
.project-footer,
.information-kicker,
.information-links {
  font-size: clamp(.64rem, .72vw, .78rem);
  line-height: 1;
  letter-spacing: .025em;
}

.wordmark {
  justify-self: center;
  padding: 8px;
  font-size: clamp(.92rem, 1.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.header-role { justify-self: start; }

.back-button {
  justify-self: end;
  display: none;
  padding: 9px 0;
  text-transform: uppercase;
}

body[data-view="project"] .back-button { display: block; }

.view {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
}

.overview-view { background: #111; }

.overview-media,
.overview-media .media-picture,
.overview-media img,
.overview-media video {
  width: 100%;
  height: 100%;
}

.overview-media .media-picture { display: block; }

.overview-media {
  overflow: hidden;
  background: #141414;
}

.overview-media img,
.overview-media video {
  display: block;
  object-fit: cover;
  animation: reveal 620ms cubic-bezier(.2, .7, .2, 1) both;
}

.overview-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.2), transparent 28%, transparent 66%, rgba(0,0,0,.34));
  pointer-events: none;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.stage-control {
  position: absolute;
  z-index: 4;
  top: 68px;
  bottom: 76px;
  width: 30%;
}

.stage-control-prev { left: 0; cursor: w-resize; }
.stage-control-next { right: 0; cursor: e-resize; }

.overview-count,
.overview-prompt {
  position: absolute;
  z-index: 6;
  bottom: 74px;
}

.overview-count { left: var(--pad); }
.overview-prompt { right: var(--pad); }

.overview-title {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: clamp(92px, 13vh, 150px);
  width: min(92vw, 1500px);
  transform: translateX(-50%);
  padding: 18px;
  color: #fff;
  font-size: clamp(3rem, 9.7vw, 10rem);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -.07em;
  text-align: center;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
  text-transform: uppercase;
  mix-blend-mode: difference;
  overflow-wrap: anywhere;
}

.site-nav {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 19px;
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  transform: translateX(-50%);
  mix-blend-mode: difference;
}

.site-nav button {
  position: relative;
  padding: 9px 0;
  text-transform: uppercase;
}

.site-nav button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.site-nav button:hover::after,
.site-nav button:focus-visible::after,
.site-nav button[aria-current="page"]::after { transform: scaleX(1); }

.index-view {
  overflow-y: auto;
  padding: 82px var(--pad) 94px;
  color: var(--ink);
  background: var(--paper);
}

.project-index {
  position: relative;
  z-index: 2;
  width: min(92vw, 920px);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 82px) 0;
  list-style: none;
  text-align: center;
}

.project-index button {
  display: inline-flex;
  align-items: baseline;
  padding: 4px 8px;
  color: var(--ink);
  font-size: clamp(.95rem, 1.85vw, 1.85rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.045em;
  text-transform: uppercase;
  transition: opacity 150ms ease, transform 150ms ease;
}

.project-index:has(button:hover) button:not(:hover) { opacity: .22; }
.project-index button:hover,
.project-index button:focus-visible { transform: scale(1.025); }

.index-preview {
  position: fixed;
  z-index: 1;
  inset: 50% auto auto 50%;
  width: min(34vw, 500px);
  aspect-ratio: 4 / 5;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.index-preview.is-visible { opacity: .2; }

.index-preview img,
.index-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.index-preview .media-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.information-view {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 90px var(--pad) 110px;
  color: var(--ink);
  background: var(--paper);
}

.information-inner {
  min-height: calc(100vh - 200px);
  display: grid;
  grid-template-columns: 1fr minmax(260px, .42fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(40px, 12vw, 190px);
}

.information-kicker { margin: 0; }

.information-inner h1 {
  grid-column: 1 / -1;
  align-self: center;
  max-width: 13ch;
  margin: 8vh 0;
  font-size: clamp(3.2rem, 8.2vw, 9.5rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.07em;
}

.information-copy {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -.025em;
  text-transform: none;
}

.information-links {
  justify-self: end;
  display: grid;
  align-content: end;
  gap: 0;
}

.information-links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  padding: 0;
  font-size: clamp(.9rem, 1vw, 1rem);
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.information-links span {
  font-size: .75rem;
  line-height: 1.5;
}

.information-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.project-view { background: var(--paper); color: var(--ink); }

.project-media {
  position: absolute;
  inset: 76px var(--pad) 118px;
  display: grid;
  place-items: center;
}

.project-media img,
.project-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: project-reveal 300ms ease both;
}

.project-media .media-picture {
  position: absolute;
  inset: 0;
  display: block;
}

@keyframes project-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.project-counter {
  position: absolute;
  left: var(--pad);
  top: 82px;
}

.project-footer {
  position: absolute;
  right: var(--pad);
  bottom: 18px;
  left: var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  pointer-events: none;
}

.project-footer > * { pointer-events: auto; }
.project-footer h1 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}
.project-footer p { justify-self: end; margin: 0; color: rgba(0,0,0,.58); }
.project-controls { display: flex; align-items: center; gap: 7px; }
.project-controls button { padding: 7px 0; text-transform: uppercase; }

body[data-view="index"],
body[data-view="information"],
body[data-view="project"] { background: var(--paper); }

body[data-view="index"] .site-header,
body[data-view="index"] .site-nav,
body[data-view="information"] .site-header,
body[data-view="information"] .site-nav,
body[data-view="project"] .site-header {
  color: var(--ink);
  mix-blend-mode: normal;
}

body[data-view="information"] .header-role { visibility: hidden; }

body[data-view="project"] .site-nav { display: none; }

@media (max-width: 720px) {
  :root { --pad: 13px; }
  .site-header { height: 58px; }
  .header-role { display: none; }
  .site-header { grid-template-columns: 1fr auto 1fr; }
  .wordmark { grid-column: 2; font-size: .86rem; }
  .back-button { grid-column: 3; grid-row: 1; }
  .overview-title {
    bottom: 116px;
    max-height: calc(100vh - 188px);
    padding: 8px;
    font-size: clamp(2.15rem, 12.5vw, 4.6rem);
    line-height: .84;
  }
  .overview-prompt { display: none; }
  .overview-count { bottom: 68px; }
  .site-nav { bottom: 14px; width: calc(100% - 26px); justify-content: space-between; gap: 8px; }
  .index-view { padding-top: 70px; }
  .project-index { width: 100%; padding-top: 42px; }
  .project-index button { font-size: clamp(1rem, 4.5vw, 1.45rem); line-height: 1.04; }
  .index-preview { display: none; }
  .information-view { padding-top: 76px; }
  .information-inner { min-height: calc(100vh - 175px); grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; }
  .information-inner h1 {
    grid-column: 1;
    max-width: 100%;
    margin: 9vh 0 6vh;
    font-size: clamp(1.9rem, 9.8vw, 3.5rem);
    line-height: .86;
    letter-spacing: -.06em;
  }
  .information-copy { font-size: 1.02rem; }
  .information-links { justify-self: start; align-self: end; margin-top: 62px; }
  .project-media { inset: 68px 12px 134px; }
  .project-footer { grid-template-columns: 1fr; justify-items: center; gap: 8px; bottom: 21px; }
  .project-footer h1 { grid-row: 1; }
  .project-footer p { justify-self: center; grid-row: 2; }
  .project-controls { grid-row: 3; }
  .project-counter { top: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
