/* "At a glance" strip and the four-check story: steps scroll on the left, a painted stage stays on the right. */
.glance {
  position: relative;
  isolation: isolate;
  padding-block: clamp(28px, 4vw, 56px);
  background: var(--bg-alt);
}

.glance__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.story {
  position: relative;
  isolation: isolate;
  padding-block: var(--section-y) 0;
  background: var(--bg);
}

.story__intro {
  max-width: 780px;
  margin-bottom: clamp(32px, 5vw, 72px);
}

.story__intro .eyebrow,
.section-head .eyebrow {
  color: var(--accent-strong);
}

.story__intro .display,
.section-head .display {
  margin-top: 12px;
  font-size: var(--display-2);
}

.story__shell {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  column-gap: clamp(24px, 4vw, 64px);
}

.story__steps {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 22svh, 220px);
  padding-block: 4svh clamp(80px, 22svh, 220px);
}

.step {
  transition: box-shadow 0.5s ease, background-color 0.5s ease, transform 0.5s var(--ease);
}

.step.is-active {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-card);
  transform: translateY(-2px);
}

.step:focus-visible {
  outline-offset: 6px;
}

.step__title {
  font-size: var(--display-3);
  line-height: 1.08;
}

.step__text {
  max-width: 34em;
}

.step__note {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.step .eyebrow {
  color: var(--accent-strong);
}

/* stage */
.story__scene {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
}

.stage {
  position: relative;
  width: 100%;
  max-height: 78svh;
  aspect-ratio: 1.12;
  overflow: hidden;
  border-radius: 36px;
  background: var(--cobalt-600);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.stage__art {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  height: 100%;
  aspect-ratio: 16 / 9;
  transform-origin: 0 0;
  transition: transform 1.1s var(--ease);
  will-change: transform;
}

.stage__img {
  display: block;
  width: 100%;
  height: 100%;
}

.stage__img--night,
html[data-theme="night"] .stage__img--day {
  display: none;
}

html[data-theme="night"] .stage__img--night {
  display: block;
}

.stepper {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 2;
  padding: 16px 16px 10px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 18px 36px -18px rgb(30 41 39 / 0.7);
  color: var(--text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.stepper__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 16px;
}

.stepper__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.stepper__item.is-active .stepper__label {
  color: var(--accent-strong);
}

@media (max-width: 1023px) {
  .glance__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .story__shell {
    display: flex;
    flex-direction: column;
  }

  .story__scene {
    order: -1;
    top: var(--header-h);
    z-index: 3;
    height: 42svh;
    padding-block: 8px 10px;
    background: var(--bg);
  }

  .story__steps {
    order: 1;
  }

  .stage {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 22px;
  }

  .stepper {
    inset: auto 10px 10px;
    padding: 12px 12px 6px;
  }

  .stepper__list {
    margin-top: 12px;
  }

  .stepper__link {
    font-size: 0.625rem;
  }

  .story__steps {
    gap: 28px;
    padding-block: 20px 60px;
  }

  .step {
    scroll-margin-top: calc(42svh + 4px); /* plus the scroll-padding on html (header + 12px): card lands 16px under the pinned stage */
  }
}

@media (max-width: 599px) {
  .glance__list {
    grid-template-columns: minmax(0, 1fr);
  }
}
