/* Colour flows inside the pill. Its position, label and hit area stay fixed. */
.talk-link[data-tactile-control="primary"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #101111;
  background: var(--cream, #eeeee8);
  transition: none;
}
.talk-link[data-tactile-control="primary"]:hover {
  color: #101111;
  background: var(--cream, #eeeee8);
}
.talk-link[data-tactile-control="primary"]::before {
  content: '';
  position: absolute;
  left: var(--cf-fill-x, 50%);
  top: var(--cf-fill-y, 50%);
  width: var(--cf-fill-size, 600px);
  height: var(--cf-fill-size, 600px);
  border-radius: 50%;
  background: #019edb;
  transform: translate(-50%, -50%) scale(0);
  transform-origin: center;
  transition: transform 620ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.talk-link[data-tactile-control="primary"] .cf-control-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: inherit;
  font: inherit;
  letter-spacing: inherit;
  pointer-events: none;
}
.talk-link[data-tactile-control="primary"] .cf-control-arrow {
  display: inline-block;
  flex-shrink: 0;
  transform: translate(var(--cf-arrow-x, 0px), var(--cf-arrow-y, 0px));
  transition: transform 380ms cubic-bezier(.16, 1, .3, 1);
}
.talk-link[data-tactile-control="primary"].is-tactile-hover::before {
  transform: translate(-50%, -50%) scale(1);
}
.talk-link[data-tactile-control="primary"]:is(:focus-visible, :active) {
  color: #101111;
  background: #019edb;
}
.talk-link[data-tactile-control="primary"]:focus-visible {
  outline: 2px solid #019edb;
  outline-offset: 5px;
  border-radius: 40px;
}
.talk-link[data-tactile-control="primary"]:focus-visible::before {
  display: none;
}

/* Service pills retain their layout; only plain text links get the underline. */
.text-link:not(.cf-service > .text-link) { position: relative; }
.text-link:not(.cf-service > .text-link)::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #019edb;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 400ms cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.text-link:not(.cf-service > .text-link):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}
@media (hover: hover) and (pointer: fine) and (min-width: 951px) {
  .text-link:not(.cf-service > .text-link):hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }
  html:not([data-motion="off"]) .text-link:not(.cf-service > .text-link):is(:hover, :focus-visible) > span[aria-hidden="true"] {
    transform: translate(4px, -4px);
  }
}

/* Touch and motion preferences use immediate colour/focus feedback. */
html[data-motion="off"] .talk-link[data-tactile-control="primary"]:hover { background: #019edb; }
html[data-motion="off"] .talk-link[data-tactile-control="primary"]::before { display: none; }
html[data-motion="off"] .text-link::after,
html[data-motion="off"] .text-link > span[aria-hidden="true"],
html[data-motion="off"] .cf-control-arrow { transition: none !important; }
html[data-motion="off"] .talk-link[data-tactile-control="primary"] .cf-control-arrow,
html[data-motion="off"] .text-link > span[aria-hidden="true"] { transform: none; }
@media (max-width: 950px), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .talk-link[data-tactile-control="primary"]:hover { background: #019edb; }
  .talk-link[data-tactile-control="primary"]::before { display: none; }
  .talk-link[data-tactile-control="primary"] .cf-control-arrow,
  .text-link > span[aria-hidden="true"] { transform: none !important; transition: none !important; }
  .text-link:not(.cf-service > .text-link)::after { transition: none; }
}
