/* Hallmark · MissaciWeb · user-supplied two-arrow button, brand colours retained */
/* Expanding fill and sliding arrows use transforms; label and link stay native. */
:root {
  --button-fill: var(--cyan);
  --button-ink: var(--color-accent-ink);
  --button-hover-fill: var(--mint);
  --button-curve: cubic-bezier(.16, 1, .3, 1);
  --button-arrow-curve: cubic-bezier(.16, 1, .3, 1);
  --button-clear: transparent;
}

.button.animated-button {
  --button-active-fill: var(--button-hover-fill);
  --button-active-ink: var(--button-ink);
  --button-rest-fill: var(--button-fill);
  position: relative;
  isolation: isolate;
  overflow: clip;
  gap: 0;
  padding-inline: 40px;
  border-color: var(--button-fill);
  color: var(--button-ink);
  background: var(--button-fill);
  transition: color 180ms var(--button-curve), transform 180ms var(--button-curve);
}
.button.animated-button:not(.header-contact) { padding-inline: 40px; }
.button.animated-button.button-secondary {
  --button-active-fill: var(--cyan);
  --button-rest-fill: var(--button-clear);
  color: var(--text);
  border-color: var(--line);
  background: transparent;
}
.animated-button .text {
  position: relative;
  z-index: 2;
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
  transform: translateX(-8px);
  transition: transform 520ms var(--button-arrow-curve);
}
.animated-button svg {
  position: absolute;
  z-index: 2;
  top: calc(50% - 10px);
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
  transition: transform 520ms var(--button-arrow-curve);
}
.animated-button .arr-1 { right: 12px; }
.animated-button .arr-2 { left: 12px; transform: translateX(-56px); }
.animated-button .circle {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: calc(100% + 64px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--button-rest-fill);
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.03);
  transition: transform 620ms var(--button-curve), opacity 160ms var(--button-curve);
}
.js .animated-button .circle { opacity: 0; background: var(--button-active-fill); }
.animated-button.header-contact { padding-inline: 36px; }
.animated-button.header-contact svg { width: 18px; height: 18px; top: calc(50% - 9px); }

@media (hover: hover) and (pointer: fine) {
  .button.animated-button:hover:not(:focus-visible) { color: var(--button-active-ink); background: var(--button-fill); }
  .button.animated-button.button-secondary:hover:not(:focus-visible) { background: transparent; }
  .animated-button:hover:not(:focus-visible) .text { transform: translateX(8px); }
  .animated-button:hover:not(:focus-visible) .arr-1 { transform: translateX(56px); }
  .animated-button:hover:not(:focus-visible) .arr-2 { transform: translateX(0); }
  .animated-button:hover:not(:focus-visible) .circle { background: var(--button-active-fill); opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Keyboard feedback is immediate. Menu/cookie actions keep their own controls. */
.button.animated-button:focus-visible,
.animated-button:focus-visible .text,
.animated-button:focus-visible svg,
.animated-button:focus-visible .circle { transition: none; }

@media (hover: none), (pointer: coarse) {
  .button.animated-button:active { color: var(--button-active-ink); background: var(--button-active-fill); }
  .animated-button:active .circle { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .button.animated-button, .animated-button .text, .animated-button svg, .animated-button .circle { transition: none; }
  .button.animated-button:hover, .button.animated-button:active { transform: none !important; }
  .animated-button .text, .animated-button .arr-1 { transform: none !important; }
  .animated-button .arr-2, .animated-button .circle { display: none; }
  .button.animated-button:hover:not(:focus-visible),
  .button.animated-button.button-secondary:hover:not(:focus-visible) { color: var(--button-active-ink); background: var(--button-active-fill); }
}

@media (forced-colors: active) {
  .button.animated-button { border: 2px solid ButtonText; forced-color-adjust: auto; }
  .animated-button .circle { display: none; }
}
