/* Call to action at the end of a blog post (components/site/BlogCtaBlock.tsx).
   Rebuilt in live text from the old "Ready to take control?" image banner,
   using its colours: purple ground, two blue shapes, cream headline in Feature
   Display, lemon pill button. */

.blogcta {
  --blogcta-purple: #5e1fec;
  --blogcta-blue: #0083f8;
  --blogcta-sky: #3dc1ff;
  --blogcta-cream: #fdf7e4;
  --blogcta-lemon: #b6ff00;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 3.5rem;
  background-color: var(--blogcta-purple);
  color: var(--blogcta-cream);
}

/* The banner's two angled shapes, behind the button side. Decorative only. */
.blogcta::before,
.blogcta::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 2.5rem;
  transform: rotate(-24deg);
}

.blogcta::before {
  width: 30rem;
  height: 22rem;
  right: -9rem;
  bottom: -14rem;
  background-color: var(--blogcta-blue);
}

.blogcta::after {
  width: 12rem;
  height: 15rem;
  right: 9rem;
  bottom: -11rem;
  background-color: var(--blogcta-sky);
}

.blogcta_text {
  max-width: 34rem;
}

.blogcta_headline {
  margin: 0 0 0.75rem;
  font-family: "Featuredisplay Trial", serif;
  font-weight: 300;
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  /* Even line lengths: no single word left on the last line. */
  text-wrap: balance;
}

.blogcta_body {
  margin: 0;
  font-family: "Euclid Circular A", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.88;
  text-wrap: pretty;
}

.blogcta_nowrap {
  white-space: nowrap;
}

.blogcta_button {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  background-color: var(--blogcta-lemon);
  color: var(--blogcta-purple);
  font-family: "Euclid Circular A", sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s;
}

/* Same hover the image banner had. */
.blogcta_button:hover {
  filter: brightness(108%);
}

.blogcta_button:focus-visible {
  outline: 2px solid var(--blogcta-cream);
  outline-offset: 3px;
}

@media screen and (max-width: 767px) {
  .blogcta {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.25rem 1.5rem 2.5rem;
  }

  .blogcta_headline {
    font-size: 2rem;
  }

  .blogcta::before {
    width: 22rem;
    height: 16rem;
    right: -10rem;
    bottom: -11rem;
  }

  .blogcta::after {
    right: 6rem;
    bottom: -12rem;
  }
}
