.pillars-wrap {
  position: relative;
  z-index: 3;
  background: #ffffff;
  color: #111111;
}

.pillars-stage {
  position: relative;
}

.pillars-pin {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vh, 7rem) 0 clamp(4rem, 8vh, 7rem)
    clamp(2.4rem, 5vw, 6.4rem);
  padding-right: clamp(48px, 6vw, 90px);
  box-sizing: border-box;
  overflow: hidden;
}

.pillars-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 50%) minmax(0, 50%);
  gap: clamp(2.4rem, 4vw, 5rem);
  align-items: start;
  width: 100%;
  /* max-width: 1360px; */
  margin: 0;
  padding-right: clamp(20px, 3vw, 40px);
  box-sizing: border-box;
}

.pillars-headings {
  position: relative;
  min-height: clamp(16rem, 28vh, 26rem);
  max-width: none;
  width: 100%;
}

.pillars-bodies {
  position: relative;
  min-height: clamp(16rem, 28vh, 26rem);
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.pillars-heading {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  max-width: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  font-family: "Marcellus", serif;
  font-size: clamp(36px, 3.8vw, 54px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: #111111;
  will-change: transform, opacity, filter;
}

.pillars-heading:first-child {
  opacity: 1;
  visibility: visible;
}

.pillars-body-panel:not(:first-child) {
  opacity: 0;
  visibility: hidden;
}

.pillars-body-panel {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  will-change: transform, opacity, filter;
}

.pillars-text {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 2.05vw, 32px);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.012em;
  max-width: none;
  width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.pillars-word {
  color: #c0c4c9;
}

.pillars-heading,
.pillars-body-panel,
.pillars-rail,
.pillars-footnote {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Indicator stays on the right edge as in design */
.pillars-rail {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1.2rem;
  padding-right: 0;
  pointer-events: none;
  z-index: 10;
  will-change: transform, opacity, filter;
}

.pillars-rail-line {
  display: block;
  width: 5.6rem;
  height: 1px;
  background: #d4d8dd;
  transform-origin: right center;
  transition:
    background-color 0.4s ease,
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.3s ease;
}

.pillars-rail-line.is-active {
  width: 10.5rem;
  height: 2px;
  background: #0e1722;
}

.pillars-footnote {
  position: absolute;
  left: clamp(2.4rem, 5vw, 6.4rem);
  bottom: clamp(3.2rem, 6vh, 5.4rem);
  /* max-width: min(880px, 85vw); */
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  will-change: opacity, transform, filter;
}

.pillars-footnote-line {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: #1a1a1a;
}

@media screen and (max-width: 991px) {
  .pillars-pin {
    padding: clamp(6rem, 12vh, 8rem) 0 clamp(6rem, 12vh, 8rem)
      clamp(2.4rem, 5vw, 4rem);
    padding-right: 48px;
  }

  .pillars-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-right: 32px;
  }

  .pillars-headings,
  .pillars-bodies {
    min-height: clamp(14rem, 22vh, 20rem);
  }

  .pillars-heading {
    font-size: clamp(28px, 6vw, 42px);
    max-width: 100%;
  }

  .pillars-bodies,
  .pillars-body-panel,
  .pillars-text {
    max-width: none;
  }

  .pillars-text {
    font-size: clamp(20px, 3.4vw, 26px);
  }

  .pillars-rail-line {
    width: 3.6rem;
  }

  .pillars-rail-line.is-active {
    width: 6.8rem;
  }

  .pillars-footnote {
    left: clamp(2.4rem, 5vw, 4rem);
    bottom: 2.8rem;
    max-width: 82vw;
  }

  .pillars-footnote-line {
    font-size: 13px;
  }
}

@media screen and (max-width: 767px) {
  .pillars-stage.is-scroll-stage {
    height: var(--pillars-scroll-height, 336vh);
  }

  .pillars-pin {
    position: sticky;
    top: 0;
    padding-left: 20px;
    padding-right: 36px;
    justify-content: flex-start;
    padding-top: 14vh;
    transform: translateZ(0);
  }

  .pillars-word {
    color: #111111;
  }

  .pillars-heading,
  .pillars-body-panel,
  .pillars-rail,
  .pillars-footnote {
    will-change: auto;
  }

  .pillars-rail-line {
    transition: none;
  }

  .pillars-layout {
    padding-right: 20px;
    gap: 2.2rem;
  }

  .pillars-heading {
    font-size: clamp(24px, 7.5vw, 34px);
  }

  .pillars-bodies,
  .pillars-body-panel,
  .pillars-text {
    max-width: 100%;
  }

  .pillars-text {
    font-size: clamp(16px, 4.4vw, 20px);
  }

  .pillars-rail-line {
    width: 2.2rem;
  }

  .pillars-rail-line.is-active {
    width: 4.4rem;
  }

  .pillars-footnote {
    left: 20px;
    bottom: 20px;
    max-width: calc(100% - 60px);
  }

  .pillars-footnote-line {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pillars-word {
    color: #111111;
  }

  .pillars-rail {
    opacity: 1;
    visibility: visible;
  }

  .pillars-footnote {
    opacity: 1;
    transform: none;
  }

  .pillars-heading:not(:first-child),
  .pillars-body-panel:not(:first-child) {
    display: none;
  }
}
