/* SpecularButton — edge-light only. Never override Flow .btn-dark / .btn-line fills. */
.specular-button {
  --sb-radius: 9px;
  position: relative;
  isolation: isolate;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

/* Bare (non-.btn) specular controls — rare; keep self-contained */
a.specular-button:not(.btn),
button.specular-button:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  border: 0;
  border-radius: var(--sb-radius);
  font: inherit;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--sb-text-color, #fff);
  background: color-mix(in srgb, var(--sb-tint, #0B0B0B) calc(var(--sb-tint-opacity, .95) * 100%), transparent);
  cursor: pointer;
  text-decoration: none;
}

/*
 * Flow v4 .btn + specular: site.css owns fill/border.
 * Re-assert after any leftover specular rules so primary never flips to brand blue.
 */
.btn-dark.specular-button {
  background: var(--ink, #0B0B0B);
  color: #fff;
}
.btn-dark.specular-button:hover {
  background: #262626;
  color: #fff;
}
.btn-line.specular-button {
  background: #fff;
  color: var(--ink, #0B0B0B);
  border: 1px solid var(--line, #E8E8E8);
}
.btn-line.specular-button:hover {
  background: var(--bg-2, #FAFAF9);
  border-color: #DCDCDC;
  color: var(--ink, #0B0B0B);
}

.specular-button:active {
  transform: scale(0.98);
}
.specular-button:focus-visible {
  outline: 2px solid rgba(0, 184, 245, .45);
  outline-offset: 3px;
}
.specular-button:disabled,
.specular-button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}
.specular-button:disabled:active,
.specular-button[aria-disabled="true"]:active {
  transform: none;
}

.specular-button__light {
  position: absolute;
  inset: -24px;
  z-index: 1;
  display: block;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  pointer-events: none;
}

.specular-button__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: inherit;
}

/* Fallback: no WebGL — identical to plain .btn (no blue fill) */
.specular-button--fallback .specular-button__light {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .specular-button {
    transition: none;
  }
  .specular-button:active {
    transform: none;
  }
}
