/* ============================================================
   Hawley Design System — components layer v1.0 (2026-07-21)
   Shared primitives built ONLY on tokens.css (type) + foundation.css
   (structure) + the theme contract (colour). No raw hex, no raw font.
   Site-specific layout (hero, rails, carousels, forms) stays in each
   site's own styles.css — this file is the cross-site vocabulary.

   Founders Grotesk note: its ink sits ~0.21em above the em-box centre,
   so flex-centred labels float high in pills. Every pill-shaped control
   here biases its vertical padding by 0.2em (top +, bottom −) with
   line-height:1. Deterministic across engines, unlike text-box-trim.
   ============================================================ */

/* ---- button ---- */
.btn {
  --btn-pad-y: 0.8rem;
  --btn-pad-x: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: var(--w-display); font-size: var(--text-sm);
  line-height: 1;
  padding: calc(var(--btn-pad-y) + 0.2em) var(--btn-pad-x) calc(var(--btn-pad-y) - 0.2em);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); color: var(--fg);
  background: var(--surface); text-decoration: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn-primary {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: var(--w-display-strong);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-block { width: 100%; }

/* ---- chip (status / meta label) ---- */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: var(--w-display); font-size: var(--text-xs);
  line-height: 1;
  padding: calc(0.4rem + 0.2em) 0.7rem calc(0.4rem - 0.2em);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.chip-success { color: var(--success); }
.chip-danger { color: var(--danger); }
.chip-attention { color: var(--attention); }

/* ---- floating CTA ---- */
.cta-float {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: var(--z-float);
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: var(--w-display-strong); font-size: var(--text-sm);
  line-height: 1;
  padding: calc(0.75rem + 0.2em) 1.3rem calc(0.75rem - 0.2em);
  border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
  text-decoration: none; box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base), background var(--dur-fast) var(--ease-out);
}
.cta-float:hover { background: var(--accent-hover); }
.cta-float.is-visible, .cta-float.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
@media (min-width: 45rem) { .cta-float { right: var(--space-5); bottom: var(--space-5); } }

/* ---- card ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--space-6);
}

/* ---- eyebrow (OFF by default — see layout-anti-patterns.md; style only) ---- */
.eyebrow {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--text-sm); color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .cta-float { transition: none; transform: none; }
  .cta-float { transition: opacity 0.001ms, visibility 0.001ms; }
}
