/*
 * Éclore Aesthetics — Buttons & CTAs (VISUAL-DESIGN §5.1)
 * ─────────────────────────────────────────────────────────────────────────────
 * All CTA labels are Familjen 700, uppercase, tracked, squared corners (§5.1).
 * .btn--primary   Terracotta fill, Bone label (landmark CTAs)
 * .btn--secondary Terracotta outline
 * .btn--text      inline text CTA with Terracotta underline reveal
 * .btn--inverse   Bone outline — for use on the Terracotta / Ink bands
 * .cta-dot        6px Terracotta dot with soft halo (house accent)
 *
 * Motion budget: only background, color, and transform are animated.
 * Focus ring is the global :focus-visible compound ring (§8).
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;       /* 15px sentence-case label */
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: none;       /* sentence case, e.g. "Book a consultation" */
  text-decoration: none;
  text-align: center;
  min-height: 3rem;           /* 48px */
  padding: 0.9375rem 1.9rem;  /* 15px 30px */
  border: 1px solid transparent;
  border-radius: var(--radius-pill);  /* rounded pill */
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard),
              border-color var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

/* ─── Primary — Terracotta fill ──────────────────────────────────────────────── */

.btn--primary {
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  border-color: var(--color-cta-bg);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--color-terracotta) 88%, var(--color-ink));
  border-color: color-mix(in srgb, var(--color-terracotta) 88%, var(--color-ink));
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  background: color-mix(in srgb, var(--color-ink) 30%, var(--color-stone));
  border-color: color-mix(in srgb, var(--color-ink) 30%, var(--color-stone));
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* ─── Secondary — Terracotta outline (§5.1) ──────────────────────────────────── */

.btn--secondary {
  background: transparent;
  color: var(--color-terracotta);
  border-color: var(--color-terracotta);
  border-width: 2px; /* outline CTAs carry a heavier stroke (owner, 2026-07-22) */
}

.btn--secondary:hover,
.btn--secondary:active {
  background: var(--color-terracotta);
  color: var(--color-text-inverse);
}

.btn--secondary:active {
  transform: translateY(1px);
}

.btn--secondary:disabled,
.btn--secondary[aria-disabled="true"] {
  border-color: var(--color-hairline);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* ─── Inverse — Bone outline (for Terracotta / Ink bands) ──────────────── */

.btn--inverse {
  background: transparent;
  color: var(--color-text-inverse);
  border-color: var(--color-text-inverse);
}

.btn--inverse:hover,
.btn--inverse:active {
  background: var(--color-bone);
  border-color: var(--color-bone);
  color: var(--color-ink);
}

.btn--inverse:active {
  transform: translateY(1px);
}

/* ─── Text CTA — Terracotta underline reveal ─────────────────────────────────── */

.btn--text {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: auto;
  padding: var(--space-xs) 0;   /* tap height without a box */
  border: 0;
  border-radius: 0;
  font-size: 0.8125rem;         /* 13px tracked label */
  font-weight: 700;
  letter-spacing: var(--tracking-cta);
  text-transform: uppercase;    /* text links stay uppercase */
  background: transparent;
  color: var(--color-ink);
}

.btn--text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--space-xs) - 3px);
  height: 1px;
  background: var(--color-terracotta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-short) var(--ease-reveal);
}

.btn--text:hover::after,
.btn--text:focus-visible::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .btn--text::after { transition: none; }
}

/* ─── The "dot" CTA accent ───────────────────────────────────────────────────── */

/* Shared with .ideal-candidate__list li::before (service.css) — same Terracotta
   dot + halo recipe, reused as a list marker there; size/position stay local. */
.cta-dot,
.ideal-candidate__list li::before {
  border-radius: 50%;
  background: var(--color-terracotta);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-terracotta) 12%, transparent);
}

.cta-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
}
