.editorial-project {
  --project-paper: #f2eee8;
  --project-ink: #23241f;
  --project-muted: #746e66;
  position: relative;
  isolation: isolate;
  display: grid;
  color: var(--project-ink);
  background: var(--project-paper);
  scroll-margin-block-start: 90px;
}

.editorial-project__inner {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 32px clamp(22px, 6vw, 52px) 24px;
}

.editorial-project .editorial-project__kicker {
  margin: 0 0 clamp(13px, 1.6vw, 30px);
  color: var(--project-muted);
  font-size: clamp(10px, .72vw, 13px);
  font-weight: 650;
  letter-spacing: .28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.editorial-project .editorial-project__heading h2 {
  margin: 0;
  color: var(--project-ink);
  font-size: clamp(39px, 12vw, 64px);
  font-weight: 400;
  letter-spacing: -.058em;
  line-height: .95;
}

.editorial-project .editorial-project__heading h2 span {
  display: block;
  color: inherit;
}

.editorial-project .editorial-project__heading h2 .editorial-project__accent { color: #79736b; }

.editorial-project__detail {
  margin-block-start: 23px;
  color: #5e5a53;
  font-size: clamp(14px, 1.22vw, 20px);
  line-height: 1.45;
}

.editorial-project__detail p { max-width: 32ch; margin: 0; }

.editorial-project .editorial-project__link {
  display: inline-flex;
  align-items: center;
  gap: clamp(13px, 2vw, 36px);
  min-height: 44px;
  margin-block-start: clamp(8px, 1.65vw, 30px);
  color: var(--project-ink);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 620;
}

.editorial-project__link:hover { text-decoration: underline; text-underline-offset: .2em; }

.editorial-project__arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(26px, 2.15vw, 40px);
  aspect-ratio: 1;
  border: 1px solid #77746a;
  border-radius: 50%;
}

.editorial-project__arrow img {
  width: 50%;
  height: auto;
}

.editorial-project__photo {
  position: relative;
  min-height: clamp(190px, 55vw, 330px);
  margin: 0;
  clip-path: polygon(0 13%, 100% 0, 100% 100%, 0 100%);
}

.editorial-project .editorial-project__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 51% center;
  opacity: 0;
}

.editorial-project .editorial-project__photo img.is-previous,
.editorial-project .editorial-project__photo img.is-current { opacity: 1; }

.editorial-project__photo .is-previous { z-index: 1; }
.editorial-project__photo .is-current { z-index: 2; }

.editorial-project__photo.has-changed .is-current {
  animation: editorial-project-photo-in .85s ease-out both;
}

@keyframes editorial-project-photo-in {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}

.editorial-project__gallery-controls:not([hidden]) {
  position: absolute;
  z-index: 1;
  inset-inline-end: clamp(12px, 4.5vw, 34px);
  inset-block-end: clamp(12px, 1.4vw, 24px);
  display: flex;
  padding: 2px 5px;
  border: 1px solid #ffffff38;
  border-radius: 28px;
  background: #242822cf;
}

.editorial-project__gallery-controls button {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.editorial-project__gallery-controls button:hover { background: #ffffff24; }

.editorial-project__gallery-controls button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.editorial-project__gallery-controls img { filter: invert(1); }
.editorial-project__gallery-prev img { transform: rotate(180deg); }

.editorial-project__gallery-toggle[data-playing="true"] img { display: none; }

.editorial-project__gallery-toggle[data-playing="true"]::before {
  width: 9px;
  height: 12px;
  border-inline: 2px solid currentColor;
  content: "";
}

@media (prefers-reduced-motion: reduce) {
  .editorial-project__photo.has-changed .is-current { animation: none; }
}

@media (min-width: 861px) {
  .editorial-project { min-height: clamp(262px, 25.4vw, 500px); }

  .editorial-project::before,
  .editorial-project::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
  }

  .editorial-project::before {
    background: #eee9dfbc;
    clip-path: polygon(0 0, 74% 0, 54% 100%, 0 100%);
  }

  .editorial-project::after {
    background: var(--project-paper);
    clip-path: polygon(0 0, 53.6% 0, 60.1% 37%, 48.6% 100%, 0 100%);
  }

  .editorial-project__inner {
    grid-template-columns: 5.4% 28.8% 19.2% 1fr;
    padding: 16px 0 27px;
  }

  .editorial-project__heading { grid-column: 2; }

  .editorial-project .editorial-project__heading h2 {
    font-size: clamp(38px, 4.75vw, 92px);
  }

  .editorial-project__detail {
    grid-column: 3;
    margin-block-start: clamp(22px, 3.6vw, 70px);
    padding-inline-start: clamp(14px, 2.25vw, 44px);
    font-size: clamp(14px, 1.1vw, 18px);
    border-inline-start: 1px solid #d4cec5;
  }

  .editorial-project__photo {
    position: absolute;
    inset: 0 0 0 42%;
    z-index: -2;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 87% 100%, 0 100%);
  }

  .editorial-project__photo img { object-position: 49% center; }

  .editorial-project__gallery-controls:not([hidden]) { inset-inline-end: 8%; }
}

@media (max-width: 860px) {
  .editorial-project__photo::after {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #eee9dfb8;
    clip-path: polygon(0 13%, 100% 0, 0 23%);
    content: "";
    pointer-events: none;
  }
}
