/* Shared interaction on the portal and contact card. */
@media screen and (prefers-reduced-motion: no-preference) {
  body :is(button:enabled, .fs-button, .fs-contact-link, .biz-primary, .st-contact,
           .contact-save, .contact-call, .card-links a, .mini-call, .draft-link, a.primary) {
    transition: transform 180ms cubic-bezier(.2,.7,.25,1), box-shadow 180ms ease-out,
                color 180ms ease, background-color 180ms ease, border-color 180ms ease;
  }
  @media (hover: hover) and (pointer: fine) {
    body :is(button:enabled, .fs-button, .fs-contact-link, .biz-primary, .st-contact,
             .contact-save, .mini-call, .draft-link, a.primary):hover:not(:active) {
      transform: translateY(-2px);
      box-shadow: 0 7px 15px -7px #49345772, inset 0 1px 0 #ffffff85;
    }
    .card-links a:hover .link-arrow { transform: translateX(3px); }
  }
  body :is(button:enabled, .fs-button, .fs-contact-link, .biz-primary, .st-contact,
           .contact-save, .contact-call, .card-links a, .mini-call, .draft-link, a.primary):active {
    transform: translateY(1px) scale(.975);
    transition-duration: 75ms;
  }
  .card-links .link-arrow { transition: transform 180ms ease-out; }

  /* A hollow mask keeps the moving light entirely off the face. */
  @supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
    [data-glass-rim]::after {
      content: ""; position: absolute; pointer-events: none; inset: 0;
      border-radius: inherit; padding: clamp(3px,.44vw,6px);
      background: radial-gradient(ellipse 7rem 5rem at var(--rim-x, 13%) var(--rim-y, 0%),
                    #fff 0%, #fff 12%, #f9f2fccc 39%, transparent 88%),
                  linear-gradient(134deg, #ffffffd9 2%, transparent 28%, transparent 65%, #c6a8dd9c 94%);
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor; mask-composite: exclude;
      opacity: .48; transition: opacity 180ms ease;
      animation: fs-edge-light 440ms ease-out;
    }
    [data-glass-rim][data-lit]::after, [data-glass-rim]:active::after { opacity: 1; }
    @media (hover: hover) and (pointer: fine) {
      [data-glass-rim]:hover::after { opacity: 1; }
    }
    @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
      [data-glass-rim]::after { display: none; }
    }
  }
}
@keyframes fs-edge-light {
  0% { opacity: .22; }
  45% { opacity: .98; }
  100% { opacity: .48; }
}
