.ending-section {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: clip;
  background: var(--white);
}

.ending-picture {
  display: block;
  width: 100%;
  aspect-ratio: 1024 / 320;
  margin: 0;
  overflow: hidden;
}

.ending-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  filter: grayscale(1) contrast(1.22);
}

.ending-actions {
  --ending-actions-left: clamp(104px, 11.5vw, 184px);
  --ending-actions-bottom: clamp(104px, 18vh, 178px);
  position: absolute;
  left: var(--ending-actions-left);
  right: clamp(24px, 3vw, 48px);
  bottom: var(--ending-actions-bottom);
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: clamp(68px, 7.3vw, 112px);
  pointer-events: none;
}

.ending-button {
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 18px 8px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--black);
  font-family: inherit;
  font-size: clamp(14px, 1.08vw, 17px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.ending-button [aria-hidden="true"] {
  font-size: 1.22em;
  line-height: 0.82;
}

.ending-button:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .ending-section {
    min-height: 0;
  }

  .ending-actions {
    --ending-actions-left: clamp(38px, 8vw, 78px);
    --ending-actions-bottom: clamp(76px, 15vh, 132px);
    right: clamp(24px, 5vw, 52px);
    gap: clamp(54px, 8.8vw, 84px);
  }
}

@media (max-width: 760px) {
  .ending-section {
    min-height: 0;
  }

  .ending-picture {
    height: clamp(258px, 72vw, 340px);
    aspect-ratio: auto;
  }

  .ending-image {
    width: 125%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
  }

  .ending-actions {
    --ending-actions-left: 16px;
    --ending-actions-bottom: 30px;
    right: 16px;
    gap: clamp(34px, 10vw, 46px);
  }

  .ending-button {
    min-height: 30px;
    padding: 7px 14px;
    font-size: clamp(13px, 3.7vw, 14px);
  }

}

@media (prefers-reduced-motion: reduce) {
  .ending-actions {
    transform: none !important;
  }
}
