@keyframes aqualive-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/**
 * Solid CTA (text always visible, like footer “Quote”).
 * ::after = fill; ::before = spinning ring on hover only.
 */

a.btn.btn--primary,
button.btn.btn--primary,
a.btn.btn--ghost,
button.btn.btn--ghost,
a.btn.btn--light,
button.btn.btn--light {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

a.btn.btn--primary::after,
button.btn.btn--primary::after,
a.btn.btn--ghost::after,
button.btn.btn--ghost::after,
a.btn.btn--light::after,
button.btn.btn--light::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

a.btn.btn--primary::before,
button.btn.btn--primary::before,
a.btn.btn--ghost::before,
button.btn.btn--ghost::before,
a.btn.btn--light::before,
button.btn.btn--light::before {
  content: "";
  position: absolute;
  inset: -100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  animation: aqualive-btn-spin 3s linear infinite;
  transition: opacity 0.35s ease;
}

/* Blue spin (visible on teal / navy fills — not white) */
a.btn.btn--primary::before,
button.btn.btn--primary::before {
  background: conic-gradient(
    from 90deg at 50% 50%,
    transparent 0deg,
    transparent 220deg,
    #a8cfff 280deg,
    #5a8fd9 310deg,
    #dce9f4 335deg,
    #2d4578 360deg
  );
}

a.btn.btn--ghost::before,
button.btn.btn--ghost::before {
  background: conic-gradient(
    from 90deg at 50% 50%,
    transparent 0deg,
    transparent 215deg,
    var(--brand-blue) 290deg,
    #7eb0e8 320deg,
    #dce9f4 340deg,
    var(--brand-blue-dark) 360deg
  );
}

a.btn.btn--light::before,
button.btn.btn--light::before {
  background: conic-gradient(
    from 90deg at 50% 50%,
    transparent 0deg,
    transparent 215deg,
    var(--brand-blue) 295deg,
    #6b94d4 325deg,
    #c5d9f2 345deg,
    var(--navy) 360deg
  );
}

a.btn.btn--primary:hover::before,
button.btn.btn--primary:hover::before,
a.btn.btn--primary:focus-visible::before,
button.btn.btn--primary:focus-visible::before {
  opacity: 1;
}

a.btn.btn--ghost:hover::before,
button.btn.btn--ghost:hover::before,
a.btn.btn--ghost:focus-visible::before,
button.btn.btn--ghost:focus-visible::before,
a.btn.btn--light:hover::before,
button.btn.btn--light:hover::before,
a.btn.btn--light:focus-visible::before,
button.btn.btn--light:focus-visible::before {
  opacity: 0.95;
}

a.btn.btn--primary,
button.btn.btn--primary {
  color: #fff;
  border: 2px solid var(--teal);
}

a.btn.btn--primary::after,
button.btn.btn--primary::after {
  inset: 2px;
  background: var(--teal);
}

a.btn.btn--primary:hover,
button.btn.btn--primary:hover,
a.btn.btn--primary:focus-visible,
button.btn.btn--primary:focus-visible {
  color: #fff;
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(63, 85, 146, 0.22);
}

a.btn.btn--primary:hover::after,
button.btn.btn--primary:hover::after,
a.btn.btn--primary:focus-visible::after,
button.btn.btn--primary:focus-visible::after {
  background: var(--navy);
}

a.btn.btn--ghost,
button.btn.btn--ghost {
  color: inherit;
  border-color: currentColor;
}

a.btn.btn--ghost::after,
button.btn.btn--ghost::after {
  background: transparent;
}

a.btn.btn--ghost:hover,
button.btn.btn--ghost:hover,
a.btn.btn--ghost:focus-visible,
button.btn.btn--ghost:focus-visible {
  transform: translateY(-2px);
}

a.btn.btn--light,
button.btn.btn--light {
  color: var(--navy);
  border-color: rgba(255, 255, 255, 0.85);
}

a.btn.btn--light::after,
button.btn.btn--light::after {
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  a.btn.btn--primary::before,
  button.btn.btn--primary::before,
  a.btn.btn--ghost::before,
  button.btn.btn--ghost::before,
  a.btn.btn--light::before,
  button.btn.btn--light::before {
    animation: none;
    opacity: 0 !important;
  }

  a.btn.btn--primary:hover,
  button.btn.btn--primary:hover,
  a.btn.btn--ghost:hover,
  button.btn.btn--ghost:hover {
    transform: none;
  }
}

/**
 * Ghost on navy (Equipment CTA, footer Get a quote) — after color: inherit so it wins.
 */
a.btn.btn--ghost.btn-ghost--on-navy,
button.btn.btn--ghost.btn-ghost--on-navy {
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  font: inherit;
  text-align: center;
}

a.btn.btn--ghost.btn-ghost--on-navy::after,
button.btn.btn--ghost.btn-ghost--on-navy::after {
  background: transparent;
}

a.btn.btn--ghost.btn-ghost--on-navy:hover,
a.btn.btn--ghost.btn-ghost--on-navy:focus-visible,
button.btn.btn--ghost.btn-ghost--on-navy:hover,
button.btn.btn--ghost.btn-ghost--on-navy:focus-visible {
  color: var(--brand-blue);
  border-color: #fff;
}

a.btn.btn--ghost.btn-ghost--on-navy:hover::before,
a.btn.btn--ghost.btn-ghost--on-navy:focus-visible::before,
button.btn.btn--ghost.btn-ghost--on-navy:hover::before,
button.btn.btn--ghost.btn-ghost--on-navy:focus-visible::before {
  opacity: 0.95;
}

a.btn.btn--ghost.btn-ghost--on-navy:hover::after,
a.btn.btn--ghost.btn-ghost--on-navy:focus-visible::after,
button.btn.btn--ghost.btn-ghost--on-navy:hover::after,
button.btn.btn--ghost.btn-ghost--on-navy:focus-visible::after {
  background: #fff;
}
