:root {
  --paper: #f7f6f3;
  --ink: #191919;
  --accent: #D0212B;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial,Helvetica,sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(22px,5vw,84px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

.brand {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.07em;
  color: inherit;
  text-decoration: none;
}

.project-heading {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: end;
  max-width: 1440px;
  margin: auto;
  padding: clamp(70px,9vw,150px) clamp(22px,5vw,84px) clamp(55px,7vw,105px);
}

.eyebrow,.count {
  font-size: 10px;
  letter-spacing: .13em;
  font-weight: 700;
}

.count {
  text-align: right;
}

.project-heading h1 {
  text-align: center;
  font-size: clamp(100px,20vw,285px);
  line-height: .75;
  letter-spacing: -.105em;
  margin: 0 0 .12em -.08em;
  font-weight: 900;
}

.period {
  color: var(--accent);
}

.spread {
  display: grid;
  gap: clamp(22px,4vw,62px);
  max-width: 1280px;
  padding: 0 clamp(26px,5vw,80px);
  margin: 0 auto clamp(90px,12vw,190px);
}

.frame {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.spread--hero .frame {
  width: min(100%,810px);
  margin: auto;
}

.spread--hero img {
  max-height: 76vh;
  width: auto;
}

.spread--pair {
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start;
  column-gap: clamp(38px,7vw,112px);
}

.spread--pair .frame img {
  max-height: 64vh;
  width: auto;
  max-width: 100%;
}

.spread--pair:nth-of-type(even) .frame:last-child {
  margin-top: clamp(45px,7vw,115px);
}

.spread--pair:nth-of-type(odd) .frame:first-child {
  margin-top: clamp(35px,6vw,95px);
}

.spread--single .frame {
  width: min(100%,700px);
  margin: auto;
}

.spread--single .frame img {
  max-height: 78vh;
  width: auto;
}

.spread--full .frame {
  width: min(100%,960px);
  margin: auto;
}

.spread--full .frame img {
  max-height: 76vh;
  width: auto;
}

.end {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 40px clamp(22px,5vw,84px) 32px;
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
}

.end a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  padding: 44px 70px;
  background: rgba(13,13,13,.97);
  color: white;
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
}

.lightbox::backdrop {
  background: #111;
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  border: 0;
  background: transparent;
  color: white;
  font-size: 30px;
  padding: 14px;
  cursor: pointer;
  z-index: 2;
}

.lightbox .close {
  top: 12px;
  right: 20px;
  font-size: 42px;
}

.lightbox .previous {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-count {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .16em;
}

@media (max-width:700px) {
  .topbar {
    font-size: 9px;
  }
  .project-heading {
    grid-template-columns: 1fr 1fr;
    row-gap: 32px;
    padding-top: 70px;
    padding-bottom: 70px;
  }
  .project-heading h1 {
    order: -1;
    grid-column: 1/-1;
    font-size: clamp(115px,35vw,210px);
  }
  .count {
    text-align: right;
  }
  .spread {
    margin-bottom: 88px;
    padding: 0 24px;
  }
  .spread--pair {
    grid-template-columns: 1fr;
    gap: 54px;
  }
  .spread--pair:nth-of-type(even) .frame:last-child,.spread--pair:nth-of-type(odd) .frame:first-child {
    margin-top: 0;
  }
  .spread--pair .frame {
    width: min(100%,470px);
    margin: auto;
  }
  .spread--hero img,.spread--single .frame img,.spread--full .frame img {
    max-height: 72vh;
  }
  .end {
    flex-wrap: wrap;
    line-height: 1.6;
  }
  .lightbox {
    padding: 50px 36px;
  }
  .lightbox .previous {
    left: 0;
  }
  .lightbox .next {
    right: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}

.lightbox button.previous {
  left: clamp(5px,1.4vw,20px) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.lightbox button.next {
  right: clamp(5px,1.4vw,20px) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.lightbox button.close {
  top: 15px !important;
  right: 20px !important;
}

.project-heading h1 .period {
  display: inline-block;
  width: .115em;
  height: .115em;
  background: var(--accent);
  border-radius: 50%;
  font-size: inherit;
  color: transparent;
  line-height: 0;
  vertical-align: baseline;
  transform: translate(.17em,.03em);
}

.project-heading h1 .period {
  display: inline-block !important;
  width: .095em !important;
  height: .095em !important;
  line-height: 0 !important;
  vertical-align: baseline !important;
  transform: translate(.085em,.015em) !important;
  margin-bottom: 0 !important;
}

.project-heading h1 .period {
  display: inline-block !important;
  width: .095em;
  height: .095em;
  background: var(--accent);
  vertical-align: baseline;
  margin-left: .095em;
  margin-bottom: 0;
  line-height: 1;
  font-size: inherit;
}

.project-heading h1 .period {
  border-radius: 0 !important;
  background: var(--accent) !important;
  width: .105em !important;
  height: .105em !important;
  color: transparent !important;
  font-size: inherit !important;
  line-height: 0 !important;
  vertical-align: baseline !important;
  transform: none !important;
  position: relative;
  bottom: .012em;
  margin-left: .08em !important;
}
