html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #222;
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Top bar */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 100;
  pointer-events: none;
}

.brand,
.topnav a {
  font-family: "Minion Pro", serif;
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #222;
  pointer-events: auto;
}

.topnav a {
  margin-left: 18px;
  padding: 10px 8px;
  display: inline-block;
}

/* Footer */
.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-family: "Minion Pro", serif;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(34, 34, 34, 0.55);
  z-index: 10;
  pointer-events: none;
  display: none;
}

.landing .foot {
  display: block;
}

/* Landing */
.landing .rail {
  width: 100%;
  padding-top: 80px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.hero {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  height: auto;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* Caption legacy */
.caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-family: "Minion Pro", serif;
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.10em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* Standard work pages */
.workpage .workstack {
  padding-top: 90px;
  padding-bottom: 70px;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

.worktitle {
  margin: 0;
  padding: 20px 0 30px 0;
  font-family: "Minion Pro", serif;
  font-style: normal;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.10em;
}

.workstack img,
.workstack video {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 26px 0;
}

/* About / Contact */
.page {
  min-height: 100vh;
  padding: 110px 28px 60px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block {
  width: 100%;
  max-width: 740px;
}

.text {
  font-family: "Minion Pro", serif;
  font-style: normal;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.portrait {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto 28px auto;
}

/* Base lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1200px, 95vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  cursor: auto;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  padding: 10px 12px;
  font-family: "Minion Pro", serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  z-index: 1000;
  cursor: pointer;
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 18px;
  bottom: 18px;
}

.lb-next {
  right: 18px;
  bottom: 18px;
}

/* Editorial index */
.caption,
.cap {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  background: transparent !important;
}

.rail--editorial {
  width: min(1480px, calc(100% - 60px));
  margin: 0 auto;
  padding: 48px 0 90px;
  display: grid;
  gap: 64px;
}

.rail--editorial .hero {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
}

.rail--editorial .hero img,
.rail--editorial .cap {
  width: 980px !important;
  max-width: 100% !important;
}

.rail--editorial .hero:nth-child(odd) img,
.rail--editorial .hero:nth-child(odd) .cap {
  margin-left: 0 !important;
  margin-right: auto !important;
}

.rail--editorial .hero:nth-child(even) img,
.rail--editorial .hero:nth-child(even) .cap {
  margin-left: auto !important;
  margin-right: 0 !important;
}

.rail--editorial .hero:nth-child(4n+1) img,
.rail--editorial .hero:nth-child(4n+2) img,
.rail--editorial .hero:nth-child(4n+3) img,
.rail--editorial .hero:nth-child(4n) img {
  width: 980px !important;
}

.rail--editorial .cap {
  margin-top: 14px;
}

.cap .title {
  font-family: "Minion Pro", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.cap .meta {
  margin-top: 6px;
  font-family: "Minion Pro", serif;
  font-size: 13px;
  opacity: 0.65;
  font-style: normal;
  letter-spacing: 0.02em;
}

.cap .desc {
  margin-top: 12px;
  font-family: "Minion Pro", serif;
  font-size: 14px;
  line-height: 1.75;
  opacity: 0.9;
  max-width: 72ch;
}

/* Central Axis editorial page */
.workpage--editorial .workstack--editorial {
  max-width: 1480px;
  margin: 0 auto;
  padding-top: 110px;
  padding-bottom: 120px;
  padding-left: 28px;
  padding-right: 28px;
}

.workintro {
  max-width: 760px;
  margin: 0 auto 64px auto;
}

.workpage--editorial .worktitle {
  margin: 0;
  padding: 0;
  font-family: "Minion Pro", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.workmeta {
  margin-top: 10px;
  font-family: "Minion Pro", serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  opacity: 0.62;
}

.workdesc {
  margin-top: 18px;
  font-family: "Minion Pro", serif;
  font-size: 16px;
  line-height: 1.7;
  max-width: 62ch;
  opacity: 0.9;
}

.editorial-gallery {
  display: grid;
  gap: 58px;
}

.editorial-item {
  margin: 0;
}

.editorial-item img {
  display: block;
  height: auto;
  cursor: zoom-in;
  box-shadow: none;
  max-height: 88vh;
  object-fit: contain;
}

.editorial-item:nth-child(odd) img {
  width: min(1040px, 72vw);
  margin-left: 0;
  margin-right: auto;
}

.editorial-item:nth-child(even) img {
  width: min(920px, 64vw);
  margin-left: auto;
  margin-right: 0;
}

.editorial-item:nth-child(5n) img {
  width: min(1120px, 76vw);
}

.editorial-item:nth-child(7n) img {
  width: min(820px, 58vw);
}

.editorial-item + .editorial-item {
  padding-top: 4px;
}

/* Refined lightbox for work pages */
.workpage--editorial .lightbox {
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
}

.workpage--editorial .lightbox img {
  max-width: min(1400px, 94vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
}

/* Mobile */
@media (max-width: 900px) {
  .workpage--editorial .workstack--editorial {
    padding-top: 92px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 80px;
  }

  .workintro {
    margin-bottom: 38px;
  }

  .workpage--editorial .worktitle {
    font-size: 20px;
  }

  .workmeta {
    font-size: 14px;
  }

  .workdesc {
    font-size: 17px;
    line-height: 1.65;
  }

  .editorial-gallery {
    gap: 28px;
  }

  .editorial-item:nth-child(odd) img,
  .editorial-item:nth-child(even) img,
  .editorial-item:nth-child(5n) img,
  .editorial-item:nth-child(7n) img {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-height: none;
  }
}

@media (max-width: 780px) {
  .rail--editorial {
    width: calc(100% - 28px);
    gap: 44px;
    padding: 44px 0 80px;
  }

  .rail--editorial .hero img,
  .rail--editorial .cap {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .cap .desc {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .top {
    padding: 18px 18px;
  }

  .brand,
  .topnav a {
    font-size: 16px;
  }

  .topnav a {
    margin-left: 10px;
    padding: 12px 10px;
  }

  .landing .rail {
    gap: 28px;
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .caption {
    bottom: 14px;
    font-size: 13px;
  }

  .text {
    font-size: 18px;
  }

  .page {
    padding: 100px 18px 50px 18px;
  }
}