/*Returns a CSS clamp function which resolves to $size-at-min-width when page width is
below $min-width,
$size-at-max-width when page width is above $max-width,
and linearly scales between the two between $min-width and $max-width*/
@layer molecules {
  .linkcard {
    --hex-fill: transparent;
    --hex-color: var(--color-primary-orange);
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    gap: var(--gap-xs);
    padding: var(--padding-m);
    border-radius: var(--border-radius-default);
    border: var(--border-default-width, 2px) solid var(--surface-border);
    background: var(--surface-bg);
    box-shadow: 0 0 20px 0 rgba(162, 162, 165, 0.08);
    backdrop-filter: blur(30px);
    color: inherit;
    text-decoration: none;
  }
  @media (prefers-reduced-motion: no-preference) {
    .linkcard:is(a) {
      transition: transform var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease);
    }
    .linkcard:is(a):hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 24px 0 rgba(162, 162, 165, 0.24);
    }
    .linkcard:is(a):hover .icon-arrow-up-right {
      transform: translate(2px, -2px);
    }
  }
  .linkcard:is(a):hover, .linkcard:is(a):focus-visible {
    color: inherit;
    --hex-fill: var(--color-primary-orange);
  }
  .linkcard:is(a):hover .linkcard__button, .linkcard:is(a):focus-visible .linkcard__button {
    color: #fff;
  }
  .linkcard:is(a):focus-visible {
    outline: 2px solid var(--color-primary-orange);
    outline-offset: 2px;
  }
  .linkcard__button {
    position: relative;
    display: grid;
    place-items: center;
    justify-self: end;
    width: 3.375rem;
    height: 3rem;
    color: var(--hex-color);
    transition: color 250ms ease;
  }
  .linkcard__button > * {
    grid-area: 1/1;
  }
  .linkcard__button .icon-arrow-up-right {
    font-size: 1.8rem;
    line-height: 1;
    transition: transform var(--motion-base) var(--motion-ease);
  }
  .linkcard__hex {
    width: 100%;
    height: 100%;
    overflow: visible;
    fill: var(--hex-fill);
    stroke: var(--hex-color);
    stroke-width: 2;
    transition: fill 250ms ease;
  }
  .linkcard__head :is(h1, h2, h3, h4, h5, h6) {
    margin: 0;
  }
  .linkcard__head {
    margin-bottom: calc(var(--text-gap-h3) - var(--gap-xs));
  }
  .linkcard__head img {
    display: block;
    max-width: 100%;
    height: 2.25rem;
    width: auto;
  }
}
