/**
 * Buttons
 * Link-style buttons: <a class="btn btn-primary" href="...">Read On</a>
 *
 * The arrow is drawn by ::after with a CSS mask, so it takes the text colour
 * and no icon markup is needed in templates. Add .btn--no-arrow to drop it.
 *
 * Sizes scale between the 1920 and 414 designs with clamp().
 */

.btn.btn-primary {
  /* Bootstrap 5.3 reads these variables; the direct properties below cover older 5.x. */
  --bs-btn-color: #242935;
  --bs-btn-bg: #b9f9e3;
  --bs-btn-border-color: #b9f9e3;
  --bs-btn-hover-color: #242935;
  --bs-btn-hover-bg: #9ef2d4;
  --bs-btn-hover-border-color: #9ef2d4;
  --bs-btn-active-color: #242935;
  --bs-btn-active-bg: #8be9c8;
  --bs-btn-active-border-color: #8be9c8;
  --bs-btn-focus-shadow-rgb: 36, 41, 53;

  --btn-arrow-size: clamp(16px, calc(16px + (20 - 16) * (100vw - 414px) / (1920 - 414)), 20px);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding:
    clamp(12px, calc(12px + (18 - 12) * (100vw - 414px) / (1920 - 414)), 18px)
    clamp(24px, calc(24px + (36 - 24) * (100vw - 414px) / (1920 - 414)), 36px);
  border: 1px solid #b9f9e3;
  border-radius: 999px;
  background-color: #b9f9e3;
  color: #242935;
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, calc(16px + (18 - 16) * (100vw - 414px) / (1920 - 414)), 18px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn.btn-primary::after {
  content: "";
  flex: none;
  width: var(--btn-arrow-size);
  height: var(--btn-arrow-size);
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate 0.2s ease;
}

.btn.btn-primary.btn--no-arrow::after {
  content: none;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible {
  background-color: #9ef2d4;
  border-color: #9ef2d4;
  color: #242935;
}

/* .btn.btn-primary:hover::after,
.btn.btn-primary:focus-visible::after {
  translate: 4px 0;
} */

.btn.btn-primary:active {
  background-color: #8be9c8;
  border-color: #8be9c8;
  color: #242935;
}

.btn.btn-primary:focus-visible {
  outline: 2px solid #7e61de;
  outline-offset: 3px;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn.btn-primary,
  .btn.btn-primary::after {
    transition: none;
  }
}
