/* ============================================================================
   COMPONENTS.CSS  ·  Reusable, section-agnostic UI pieces
   Buttons · tags · pills · badges · cards · logo tiles
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm);
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Primary — the single coral "signal" action */
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); filter: brightness(0.97); }

/* Secondary — outlined, quieter */
.btn--outline { border: 1.5px solid var(--text); color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); }

/* On dark backgrounds (pine bands) */
.btn--on-dark { background: var(--accent); color: #fff; }
.btn--ghost-dark { border: 1.5px solid rgba(255,255,255,0.35); color: #fff; }
.btn--ghost-dark:hover { background: rgba(255,255,255,0.1); }

.btn .arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Mono tag (project categories, meta) -------------------------------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--color-surface-alt);
  padding: 0.3rem 0.6rem; border-radius: var(--radius-pill);
}

/* --- Category pill (filled brand variant) ------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem; border-radius: var(--radius-pill);
}

/* --- Badges -------------------------------------------------------------- */
/* "Verified" — green with check */
.badge-verified {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: var(--fs-xs); font-weight: 500; color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  padding: 0.25rem 0.6rem; border-radius: var(--radius-pill);
}
.badge-verified svg { width: 12px; height: 12px; }

/* "Available for work" — dot + label */
.badge-available {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--fs-sm); color: var(--text);
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 0.5rem 0.9rem; border-radius: var(--radius-pill);
}
.badge-available .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--color-success) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .badge-available .dot { animation: none; } }

/* --- Generic surface card ------------------------------------------------ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
/* Cards that link somewhere lift on hover */
.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

/* --- Logo tile (holds a certification/tool logo consistently) ----------- */
.logo-tile {
  display: grid; place-items: center;
  background: var(--color-surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-muted);
  font-weight: 600;
  /* NOTE: drop the official badge <img> in here — the tile keeps every
     differently-shaped logo aligned. See README. */
}

/* --- Inline text link with animated coral underline --------------------- */
.link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--brand); font-weight: 600; position: relative;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.link:hover::after { transform: scaleX(1); }
.link .arrow { transition: transform var(--dur-fast) var(--ease); }
.link:hover .arrow { transform: translateX(3px); }
