/* Buttons — refined for premium feel.
 * Primary uses a subtle gradient + inset highlight + micro hover lift.
 */

[data-mr="1"] .mr-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mr-space-2);
  min-height: 44px;
  padding: 11px 22px;
  font-family: var(--mr-font-sans);
  font-size: 14px;
  font-weight: var(--mr-fw-semi);
  line-height: 1;
  letter-spacing: -0.005em;
  border-radius: var(--mr-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  transition:
    transform var(--mr-dur-short) var(--mr-ease-soft),
    background-color var(--mr-dur-short) var(--mr-ease-soft),
    background-image var(--mr-dur-short) var(--mr-ease-soft),
    color var(--mr-dur-short) var(--mr-ease-soft),
    border-color var(--mr-dur-short) var(--mr-ease-soft),
    box-shadow var(--mr-dur-short) var(--mr-ease-soft);
}

[data-mr="1"] .mr-btn:active {
  transform: translateY(1px);
}

[data-mr="1"] .mr-btn--sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--mr-radius-sm);
}

[data-mr="1"] .mr-btn--lg {
  min-height: 52px;
  padding: 16px 26px;
  font-size: 15px;
}

/* PRIMARY — refined teal with gradient + inset highlight.
 * Phase prodiso.1 (Lewis, 31 Aug 2026): the ramp is consumed through tokens,
 * not raw hex. mktteal.1 reversed the blue direction by re-pointing the
 * --mr-*-500 variables, which recoloured every call site that used a token
 * and silently missed the hardcoded hex that used to live here — so the CTA
 * sat teal and flipped blue on hover for a week on production. Tokens only.
 */
[data-mr="1"] .mr-btn--primary {
  color: var(--mr-white);
  background-color: var(--mr-teal-500);
  background-image: linear-gradient(180deg, var(--mr-teal-400) 0%, var(--mr-teal-500) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 0 0 1px rgba(18, 58, 94, 0.6) inset,
    0 6px 14px rgba(18, 58, 94, 0.22),
    0 1px 2px rgba(11, 31, 51, 0.16);
}

/* Hover DARKENS the same teal — it does not change hue. */
[data-mr="1"] .mr-btn--primary:hover,
[data-mr="1"] .mr-btn--primary:focus-visible {
  background-image: linear-gradient(180deg, var(--mr-teal-500) 0%, var(--mr-teal-600) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 1px rgba(18, 58, 94, 0.7) inset,
    0 12px 24px rgba(18, 58, 94, 0.32),
    0 2px 4px rgba(11, 31, 51, 0.20);
  transform: translateY(-1px);
  color: var(--mr-white);
}

/* Subtle one-shot sheen on hover for primary CTAs. */
[data-mr="1"] .mr-btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.18) 52%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

[data-mr="1"] .mr-btn--primary:hover::after {
  animation: mr-btn-sheen 800ms var(--mr-ease-emphasis) forwards;
}

@keyframes mr-btn-sheen {
  from { background-position: 100% 0; opacity: 0.9; }
  to   { background-position: -20% 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-mr="1"] .mr-btn--primary:hover::after { animation: none; }
}

/* SECONDARY (light bg) — outlined navy with subtle hover. */
[data-mr="1"] .mr-btn--secondary {
  background-color: var(--mr-white);
  color: var(--mr-text-primary);
  border-color: var(--mr-border-default);
  box-shadow: 0 1px 2px rgba(11, 31, 51, 0.04);
}

[data-mr="1"] .mr-btn--secondary:hover,
[data-mr="1"] .mr-btn--secondary:focus-visible {
  border-color: var(--mr-text-primary);
  background-color: var(--mr-gray-050);
  color: var(--mr-text-primary);
  box-shadow: 0 4px 12px rgba(11, 31, 51, 0.08);
  transform: translateY(-1px);
}

/* SECONDARY on dark backgrounds (translucent). */
[data-mr="1"] .mr-btn--secondary-light {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--mr-white);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-mr="1"] .mr-btn--secondary-light:hover,
[data-mr="1"] .mr-btn--secondary-light:focus-visible {
  background-color: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.30);
  color: var(--mr-white);
  transform: translateY(-1px);
}

/* TERTIARY / GHOST. */
[data-mr="1"] .mr-btn--ghost {
  background-color: transparent;
  color: var(--mr-text-primary);
  border-color: transparent;
  border-radius: var(--mr-radius-sm);
  min-height: 38px;
  padding: 8px 14px;
}

[data-mr="1"] .mr-btn--ghost:hover,
[data-mr="1"] .mr-btn--ghost:focus-visible {
  background-color: var(--mr-gray-100);
  color: var(--mr-text-primary);
}

/* LINK. */
[data-mr="1"] .mr-link {
  color: var(--mr-text-link);
  font-weight: var(--mr-fw-semi);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--mr-dur-short) var(--mr-ease-soft);
}

[data-mr="1"] .mr-link:hover {
  color: var(--mr-text-link-hover);
}

[data-mr="1"] .mr-link::after {
  content: '→';
  display: inline-block;
  transition: transform var(--mr-dur-short) var(--mr-ease-soft);
}

[data-mr="1"] .mr-link:hover::after {
  transform: translateX(4px);
}
