:root {
  --nst-chapters-ink: oklch(0.16 0.012 275);
  --nst-chapters-white: oklch(1 0 0);
  --nst-chapters-brand: oklch(0.48 0.17 281);
  --nst-chapters-signal: var(--nst-brand-yellow, #dcff59);
  --nst-chapters-muted: oklch(0.47 0.012 275);
  --nst-chapters-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.nst-movement-chapters,
.nst-movement-chapters * {
  box-sizing: border-box;
}

.nst-movement-chapters.wp-block-group {
  background: var(--nst-chapters-white);
  color: var(--nst-chapters-ink);
  font-family: var(--nst-font-sans);
  margin: 0;
  overflow: clip;
  padding: clamp(5.5rem, 8vw, 8rem) max(4vw, 48px) clamp(5.25rem, 7vw, 7rem);
  position: relative;
}

.nst-movement-chapters__manifesto.wp-block-group {
  margin: 0 auto clamp(4.5rem, 6vw, 6rem);
  max-width: 59rem;
  text-align: center;
}

.nst-movement-chapters__lead {
  color: var(--nst-chapters-brand);
  font-size: var(--nst-type-label-size);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 1.625rem;
}

.nst-movement-chapters__heading.wp-block-heading {
  font-size: var(--nst-type-h2-size);
  font-weight: var(--nst-type-h2-weight);
  letter-spacing: var(--nst-type-h2-track);
  line-height: var(--nst-type-h2-line);
  margin: 0;
  text-wrap: balance;
}

.nst-movement-chapters__heading.wp-block-heading::after {
  background: var(--nst-chapters-signal);
  content: "";
  display: inline-block;
  height: 0.75rem;
  margin-left: -1.42em;
  position: relative;
  transform: translateY(0.1em) scaleX(1);
  transform-origin: left;
  width: 1.42em;
  z-index: -1;
}

.nst-movement-chapters__statement {
  color: var(--nst-chapters-muted);
  font-size: var(--nst-type-body-size);
  line-height: var(--nst-type-body-line);
  margin: 1.75rem auto 0;
  max-width: 48rem;
  text-wrap: pretty;
}

.nst-movement-chapters__rule {
  align-items: center;
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  margin-top: 2rem;
}

.nst-movement-chapters__rule::before,
.nst-movement-chapters__rule::after {
  background: oklch(0.86 0.006 275);
  content: "";
  height: 1px;
  width: 3.25rem;
}

.nst-movement-chapters__rule span {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nst-movement-chapters__grid {
  display: grid;
  gap: clamp(1.25rem, 2vw, 1.75rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 81.25rem;
}

.nst-movement-chapters__card {
  color: inherit;
  display: block;
  min-width: 0;
  position: relative;
  text-decoration: none;
  transform: translateY(0);
  transition: transform 700ms var(--nst-chapters-ease);
}

.nst-movement-chapters__media {
  aspect-ratio: 0.76;
  background: oklch(0.94 0.005 275);
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.nst-movement-chapters__media::after {
  background: linear-gradient(
    0deg,
    oklch(0.1 0.01 275 / 0.98) 0%,
    oklch(0.1 0.01 275 / 0.9) 18%,
    oklch(0.1 0.01 275 / 0.58) 34%,
    oklch(0.1 0.01 275 / 0.03) 56%
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 700ms var(--nst-chapters-ease);
  z-index: 0;
}

.nst-movement-chapters__media img {
  height: 122%;
  inset: 0 0 auto;
  object-fit: cover;
  position: absolute;
  transform: scale(1.001);
  transition: transform 700ms var(--nst-chapters-ease);
  width: 100%;
}

.nst-movement-chapters__card:nth-child(1) img {
  object-position: 52% top;
}

.nst-movement-chapters__card:nth-child(2) img {
  object-position: 48% top;
}

.nst-movement-chapters__card:nth-child(3) img {
  object-position: 60% top;
}

.nst-movement-chapters__desktop-label {
  bottom: 1.75rem;
  color: var(--nst-chapters-white);
  left: 1.75rem;
  position: absolute;
  right: 1.75rem;
  z-index: 1;
}

.nst-movement-chapters__desktop-label strong,
.nst-movement-chapters__desktop-label span {
  display: block;
}

.nst-movement-chapters__desktop-label strong {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.nst-movement-chapters__desktop-label span {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.nst-movement-chapters__copy {
  padding: 1.375rem 0.125rem 0;
}

.nst-movement-chapters__title {
  align-items: center;
  color: var(--nst-chapters-ink);
  display: flex;
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  font-weight: 800;
  justify-content: space-between;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

.nst-movement-chapters__arrow {
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform 500ms var(--nst-chapters-ease);
}

.nst-movement-chapters__description {
  color: var(--nst-chapters-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0.8125rem 0 0;
  text-wrap: pretty;
}

.nst-movement-chapters__underline {
  background: var(--nst-chapters-signal);
  display: block;
  height: 0.3125rem;
  margin-top: 1.125rem;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 700ms var(--nst-chapters-ease), width 700ms var(--nst-chapters-ease);
  width: 3.375rem;
}

.nst-movement-chapters__card:focus-visible {
  outline: 3px solid var(--nst-chapters-brand);
  outline-offset: 5px;
}

.nst-movement-chapters__card:active {
  transform: translateY(-1px) scale(0.995);
  transition-duration: 120ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__lead,
.nst-movement-chapters.is-ready .nst-movement-chapters__heading,
.nst-movement-chapters.is-ready .nst-movement-chapters__statement,
.nst-movement-chapters.is-ready .nst-movement-chapters__rule,
.nst-movement-chapters.is-ready .nst-movement-chapters__card {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 760ms var(--nst-chapters-ease),
    transform 760ms var(--nst-chapters-ease);
}

.nst-movement-chapters.is-ready:not(.is-visible) .nst-movement-chapters__lead,
.nst-movement-chapters.is-ready:not(.is-visible) .nst-movement-chapters__heading,
.nst-movement-chapters.is-ready:not(.is-visible) .nst-movement-chapters__statement,
.nst-movement-chapters.is-ready:not(.is-visible) .nst-movement-chapters__rule,
.nst-movement-chapters.is-ready:not(.is-visible) .nst-movement-chapters__card {
  opacity: 0.001;
  transform: translateY(1.25rem);
}

.nst-movement-chapters.is-ready .nst-movement-chapters__heading {
  transition-delay: 80ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__statement {
  transition-delay: 160ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__rule {
  transition-delay: 230ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__card:nth-child(1) {
  transition-delay: 310ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__card:nth-child(2) {
  transition-delay: 390ms;
}

.nst-movement-chapters.is-ready .nst-movement-chapters__card:nth-child(3) {
  transition-delay: 470ms;
}

.nst-movement-chapters.is-ready.is-settled .nst-movement-chapters__card {
  transition-delay: 0ms;
  transition-duration: 700ms;
}

@media (hover: hover) and (pointer: fine) {
  .nst-movement-chapters.is-ready.is-settled .nst-movement-chapters__card:hover {
    transform: translateY(-3px);
  }

  .nst-movement-chapters__card:hover .nst-movement-chapters__media img {
    transform: scale(1.035);
  }

  .nst-movement-chapters__card:hover .nst-movement-chapters__media::after {
    opacity: 1;
  }

  .nst-movement-chapters__card:hover .nst-movement-chapters__arrow {
    transform: translateX(6px);
  }

  .nst-movement-chapters__card:hover .nst-movement-chapters__underline {
    width: 5.25rem;
  }
}

@media (min-width: 900px) {
  .nst-movement-chapters__desktop-label {
    display: none;
  }

  .nst-movement-chapters__media::after,
  .nst-movement-chapters__card:hover .nst-movement-chapters__media::after {
    opacity: 0;
  }
}

@media (max-width: 899px) {
  .nst-movement-chapters.wp-block-group {
    padding: 4rem 1.25rem 4.75rem;
  }

  .nst-movement-chapters__manifesto.wp-block-group {
    margin-bottom: 3rem;
    max-width: 37rem;
  }

  .nst-movement-chapters__lead {
    font-size: var(--nst-type-label-size);
    margin-bottom: 1.125rem;
  }

  .nst-movement-chapters__heading.wp-block-heading {
    font-size: var(--nst-type-h2-size);
    line-height: var(--nst-type-h2-line);
  }

  .nst-movement-chapters__heading.wp-block-heading::after {
    height: 0.5rem;
  }

  .nst-movement-chapters__statement {
    font-size: var(--nst-type-body-size);
    line-height: var(--nst-type-body-line);
    margin-top: 1.375rem;
  }

  .nst-movement-chapters__rule {
    margin-top: 1.5625rem;
  }

  .nst-movement-chapters__grid {
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-inline: auto;
    max-width: 35rem;
  }

  .nst-movement-chapters__card {
    overflow: hidden;
  }

  .nst-movement-chapters__media {
    aspect-ratio: 1;
  }

  .nst-movement-chapters__card .nst-movement-chapters__media img {
    height: 100%;
    object-position: center 60%;
  }

  .nst-movement-chapters__desktop-label {
    display: none;
  }

  .nst-movement-chapters__copy {
    bottom: 1.25rem;
    color: var(--nst-chapters-white);
    left: 1.25rem;
    padding: 0;
    pointer-events: none;
    position: absolute;
    right: 1.25rem;
    z-index: 2;
  }

  .nst-movement-chapters__title {
    color: var(--nst-chapters-white);
    font-size: 1.625rem;
  }

  .nst-movement-chapters__description {
    color: oklch(0.95 0.004 275);
    font-size: 0.875rem;
    margin-top: 0.45rem;
    max-width: 88%;
  }

  .nst-movement-chapters__underline {
    height: 0.25rem;
    margin-top: 0.75rem;
    width: 2.875rem;
  }
}

@media (max-width: 359px) {
  .nst-movement-chapters.wp-block-group {
    padding-inline: 1rem;
  }
}
