/* buttons.css — the one definition of a Hired Aura button.
 *
 * Previously declared twice: inline in index.html and again in chrome.css. Two
 * copies of the primary call to action is how they drift, so this is the single
 * source and every page links it.
 *
 * The glow is built from box-shadow rather than a blurred pseudo-element on
 * purpose. A ::before at `z-index: -1` sits *above* the button's own background
 * the moment anything creates a stacking context on the button — and
 * `transform` on :hover does exactly that, so the bloom would black out the
 * gradient precisely when it appeared. Box shadows paint outside the border box
 * and are never clipped by the element's own `overflow`, so they compose
 * cleanly with the sheen below.
 */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .68rem 1.25rem;
  border-radius: 10px;
  font-size: var(--s-1, .875rem);
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform .18s cubic-bezier(.2, .8, .3, 1),
    box-shadow .3s ease,
    background-position .55s ease,
    background .2s ease,
    border-color .2s ease;
}

/* ─── Primary ─────────────────────────────────────────────
 *
 * The resting state stays calm — this sits in a sticky nav on every page, and
 * something permanently animating beside the wordmark reads as an advert
 * rather than a control. All the drama is on hover.
 */
.btn-primary {
  color: #0B0814;
  /* Oversized so `background-position` has somewhere to travel on hover: the
     gradient drifts across the face instead of sitting still. */
  background-image: linear-gradient(115deg, #C9BFFF 0%, #8B7BFF 38%, #7B6BF0 62%, #8B7BFF 100%);
  background-size: 180% 100%;
  background-position: 0 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(171, 158, 255, .34),
    0 8px 26px -10px rgba(139, 123, 255, .75);
}

/* Specular sweep. Animating `background-position` keeps it inside the element,
   so it needs no transform and cannot trip the stacking-context problem above. */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, .5) 50%,
    transparent 58%
  );
  background-size: 250% 100%;
  background-position: 160% 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  /* The aura itself: violet core, cyan and magenta bleeding out at the edges —
     the same spectrum as the brand mark, only ever seen on hover. */
  box-shadow:
    0 0 0 1px rgba(171, 158, 255, .62),
    0 12px 32px -8px rgba(139, 123, 255, .95),
    0 0 24px -4px rgba(91, 216, 232, .5),
    0 0 46px 2px rgba(224, 107, 200, .32);
}

.btn-primary:hover::after { animation: btn-sheen .8s cubic-bezier(.3, .7, .4, 1); }

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(171, 158, 255, .5),
    0 4px 14px -6px rgba(139, 123, 255, .8);
}

@keyframes btn-sheen {
  from { background-position: 160% 0; }
  to   { background-position: -60% 0; }
}

/* ─── Ghost ───────────────────────────────────────────────── */
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .04);
  border-color: var(--hairline-hi);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(171, 158, 255, .4);
}

.btn-lg { padding: .88rem 1.6rem; font-size: var(--s0, 1rem); border-radius: 12px; }

/* Keyboard users get the same affordance as the mouse, and a visible ring. */
.btn:focus-visible {
  outline: 2px solid var(--violet-hi, #AB9EFF);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: box-shadow .2s ease, background .2s ease, border-color .2s ease; }
  .btn-primary:hover { transform: none; }
  .btn-primary:active { transform: none; }
  .btn-primary:hover::after { animation: none; }
}
