/* =======================================
   48/ BUTTON SYSTEM
   Uses variables from :root in main.css
   ======================================= */

/* Base button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  background: #111827;
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease,
    border-color 0.18s ease;
}

.btn:hover {
  background: #020617;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

/* Primary = main dark button (default look) */
.btn--primary {
  background: linear-gradient(140deg, #0f172a, #020617);
  border-color: rgba(59, 130, 246, 0.22);
  color: #fff;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.32);
}

.btn--primary:hover,
.btn--primary:focus {
  background: radial-gradient(120% 120% at 30% 30%, rgba(59, 130, 246, 0.22), rgba(2, 6, 23, 0.96));
  color: #fff;
  border-color: rgba(59, 130, 246, 0.32);
}

.btn--primary:focus-visible{
  outline: 2px solid rgba(59, 130, 246, 0.32);
  outline-offset: 2px;
}

/* Secondary = light/outline version */
.btn--secondary {
  background: transparent;
  color: var(--color-text-main);
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: none;
}

.btn--secondary:hover {
  background: rgba(148, 163, 184, 0.04);
  border-color: rgba(148, 163, 184, 0.55);
}

/* Ghost = ultra-minimal text style (no border) */
.btn--ghost {
  background: transparent;
  color: var(--color-text-main);
  border-color: transparent;
  box-shadow: none;
  padding-inline: 0;
}

.btn--ghost:hover {
  background: transparent;
  color: var(--color-text-main);
  transform: translateY(0);
  box-shadow: none;
}

/* Light variant for dark sections (e.g. dark CTA) */
.btn--light {
  background: #f9fafb;
  color: #020617;
  border-color: rgba(248, 250, 252, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.btn--light:hover {
  background: #ffffff;
}

/* Small size */
.btn--sm {
  padding: 6px 14px;
  font-size: var(--text-xs);
}

/* Full-width on mobile or forms */
.btn--full {
  width: 100%;
  justify-content: center;
}

/* Icon spacing helper */
.btn__icon-left {
  margin-right: 8px;
  display: inline-flex;
}

.btn__icon-right {
  margin-left: 8px;
  display: inline-flex;
}

/* Special header CTA tweak if needed */
.btn-header {
  margin-left: 12px;
  padding-inline: 16px;
}

/* Accent = premium secondary CTA (quiet confidence) */
.btn--accent {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.03)
  );
  color: #ffffff;
  border-color: rgba(255,255,255,0.45);
  box-shadow:
    inset 0 1px rgba(255,255,255,0.28),
    0 10px 28px rgba(15,23,42,0.28);
  backdrop-filter: blur(6px);
}

.btn--accent:hover,
.btn--accent:focus {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.14),
    rgba(255,255,255,0.05)
  );
  border-color: rgba(255,255,255,0.65);
  box-shadow:
    inset 0 1px rgba(255,255,255,0.35),
    0 14px 34px rgba(15,23,42,0.36);
  transform: translateY(-1px);
}

.btn--accent:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px rgba(255,255,255,0.22),
    0 8px 22px rgba(15,23,42,0.22);
}


.btn--accent:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 2px;
}
