/* The tape is the boundary: Eniac sits inside its lower fold, on the white yard side. */
.feedback-banner {
  --ribbon-size: 420px;
  --ribbon-left: 36%;
  --ribbon-top: -105px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  width: calc(100% - 96px);
  max-width: 1400px;
  margin: 104px auto 88px;
  color: #fff;
  background: #fff;
  border-radius: 14px;
  box-shadow: 14px 18px 40px rgba(18, 22, 67, 0.18), 0 4px 12px rgba(18, 22, 67, 0.08);
}

.feedback-banner::before {
  content: "";
  position: absolute;
  inset: -18px 8px -18px auto;
  width: 38%;
  background: image-set(
    url("../img/feedback/observatory-640.webp") 1x,
    url("../img/feedback/observatory-1280.webp") 2x
  ) right bottom / contain no-repeat;
  opacity: 0.75;
  pointer-events: none;
}

.feedback-banner__inner {
  position: relative;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  min-height: 280px;
  max-width: none;
  padding: 40px 64px;
}

/* Follow the centers of the existing ribbon's three runs, leaving the mascot on white. */
.feedback-banner__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bs-primary);
  clip-path: polygon(
    0 0,
    var(--ribbon-left) 0,
    calc(var(--ribbon-left) + var(--ribbon-size) * 0.03) calc(var(--ribbon-top) + var(--ribbon-size) * 0.09),
    calc(var(--ribbon-left) + var(--ribbon-size) * 0.95) calc(var(--ribbon-top) + var(--ribbon-size) * 0.50),
    calc(var(--ribbon-left) + var(--ribbon-size) * 0.95) calc(var(--ribbon-top) + var(--ribbon-size) * 0.58),
    calc(var(--ribbon-left) + var(--ribbon-size) * 0.20) calc(var(--ribbon-top) + var(--ribbon-size) * 0.67),
    calc(var(--ribbon-left) + var(--ribbon-size) * 0.94) calc(var(--ribbon-top) + var(--ribbon-size)),
    0 100%
  );
  pointer-events: none;
}

.feedback-banner__mascot {
  position: absolute;
  z-index: 1;
  top: var(--ribbon-top);
  left: var(--ribbon-left);
  display: block;
  width: var(--ribbon-size);
  max-width: none;
  height: auto;
  pointer-events: none;
}

.feedback-banner__copy,
.feedback-banner__action {
  position: relative;
  z-index: 2;
}

.feedback-banner__copy {
  width: 47%;
  min-width: 0;
}

.feedback-banner__copy h2 {
  margin: 0 0 8px;
  color: #ffd335;
  font-size: clamp(29px, 2.8vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.feedback-banner__copy p {
  max-width: 440px;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}

.feedback-banner__action {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  border: 0;
  border-radius: 6px;
  padding: 10px 24px;
  color: var(--bs-primary);
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.feedback-banner__action:hover,
.feedback-banner__action:focus-visible {
  color: var(--bs-primary);
  background: #fff3be;
}

.feedback-banner__action:focus-visible {
  outline: 3px solid #ffd335;
  outline-offset: 5px;
}

.feedback-banner + footer {
  position: relative;
  margin-top: 0;
  background: #fff;
}

/* Match the banner's text inset, including the footer row's cancelling gutters. */
.feedback-banner + footer > .container {
  width: calc(100% - 96px);
  max-width: 1400px;
  padding-inline: 64px;
}

.feedback-banner + footer .text-muted {
  max-width: 245px;
}

@media (max-width: 1199.98px) {
  .feedback-banner + footer > .container {
    width: calc(100% - 48px);
    padding-inline: 32px;
  }

  .feedback-banner {
    --ribbon-size: 400px;
    --ribbon-left: 35%;
    --ribbon-top: -95px;
    width: calc(100% - 48px);
  }

  .feedback-banner__inner {
    padding: 32px;
  }

  .feedback-banner__copy p {
    font-size: 18px;
  }
}

@media (max-width: 767.98px) {
  .feedback-banner + footer > .container {
    width: calc(100% - 32px);
    padding-inline: 24px;
  }

  .feedback-banner {
    --ribbon-size: 360px;
    --ribbon-left: calc(50% - 220px);
    --ribbon-top: -110px;
    width: calc(100% - 32px);
    margin: 64px auto 56px;
  }

  .feedback-banner::before {
    inset: 0 -16px auto auto;
    width: 62%;
    height: 230px;
  }

  .feedback-banner__inner {
    gap: 18px;
    padding: 248px 24px 28px;
    background: linear-gradient(to bottom, transparent 220px, var(--bs-primary) 220px);
  }

  .feedback-banner__inner::before {
    height: 220px;
  }

  .feedback-banner__copy {
    width: 100%;
  }

  .feedback-banner__copy h2 {
    font-size: clamp(27px, 5vw, 34px);
  }

  .feedback-banner__action {
    font-size: 18px;
  }
}
