/* CODR landing — primitives (L3): Button · Badge · Tag · Card · Section header.
   Requires tokens.css + base.css. Light only. Radius 0, flat offset shadows, orange corner notch.
   Rules: Orange fill always carries an Ink label (never white). No letter-spacing literals (Arabic joins). */

/* ============ Button ============
   <button class="btn">, <a class="btn btn--outline btn--lg">. Disabled: [disabled] or [aria-disabled="true"] (+ tabindex="-1" on links). */
.btn {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink);
  --btn-border: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-5);
  font: 700 var(--text-base)/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid var(--btn-border);
  border-radius: var(--radius-0);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out);
}
.btn > svg { flex: none; width: 1.125em; height: 1.125em; }
.btn--lg { min-height: 3.25rem; padding-inline: var(--space-6); font-size: 1.125rem; }

.btn--outline { --btn-bg: transparent; --btn-fg: var(--petrol); --btn-border: var(--petrol); }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--petrol); --btn-border: transparent; }

/* Hover only where a real pointer exists (no sticky hover on touch) */
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-btn); }
  .btn--outline:hover { --btn-bg: var(--petrol); --btn-fg: #FFFFFF; transform: none; box-shadow: none; }
  .btn--ghost:hover { --btn-bg: var(--concrete); transform: none; box-shadow: none; }
}
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn--outline:active { --btn-bg: var(--p9); --btn-fg: #FFFFFF; }
.btn--ghost:active { --btn-bg: var(--line-soft); }

.btn:disabled,
.btn[aria-disabled="true"] {
  --btn-bg: var(--concrete);
  --btn-fg: var(--faint);          /* disabled controls are exempt from text contrast */
  --btn-border: var(--line);
  transform: none;
  box-shadow: none;
  pointer-events: none;
  cursor: not-allowed;
}
.btn--ghost:disabled,
.btn--ghost[aria-disabled="true"] { --btn-bg: transparent; --btn-border: transparent; }

/* ============ Badge (status) ============ */
.badge {
  --badge-bg: var(--concrete);
  --badge-fg: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  font: 600 var(--text-xs)/1.4 var(--font-mono);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--badge-fg);
  background: var(--badge-bg);
  border-radius: var(--radius-0);
}
.badge::before { content: ''; flex: none; width: 6px; height: 6px; background: currentColor; }
.badge--orange { --badge-bg: var(--orange-soft); --badge-fg: var(--orange-text); }
.badge--ok     { --badge-bg: var(--ok-bg);       --badge-fg: var(--ok-text); }
.badge--warn   { --badge-bg: var(--warn-bg);     --badge-fg: var(--warn-text); }
.badge--bad    { --badge-bg: var(--bad-bg);      --badge-fg: var(--bad-text); }
.badge--info   { --badge-bg: var(--info-bg);     --badge-fg: var(--info-text); }

/* ============ Tag (category / technical area) ============
   Colour is a marker only; the text label always carries the meaning. */
.tag {
  --tag-mark: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--space-2) 2px 6px;
  font: 600 var(--text-xs)/1.4 var(--font-mono);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--concrete);
  border-radius: var(--radius-0);
}
.tag::before { content: ''; flex: none; width: 8px; height: 8px; background: var(--tag-mark); }
.tag--fe { --tag-mark: var(--area-fe); }
.tag--be { --tag-mark: var(--area-be); }
.tag--db { --tag-mark: var(--area-db); }
.tag--ts { --tag-mark: var(--area-ts); }

/* ============ Card (orange corner notch, flat offset shadow) ============ */
.card {
  position: relative;
  padding: var(--space-5);
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-0);
  box-shadow: var(--shadow-flat);
}
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: var(--notch-size);
  height: var(--notch-size);
  border: var(--notch-weight) solid var(--notch-color);
  border-right: 0;
  border-bottom: 0;
  pointer-events: none;
}
.card--plain { box-shadow: none; }
.card--plain::before { display: none; }
.card__title {
  margin-bottom: var(--space-2);
  font: 700 var(--text-lg)/1.2 var(--font-display);
  color: var(--petrol);
}

/* ============ Section header (eyebrow · title · lead) ============ */
.section-head { max-width: 46rem; }
.section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font: 600 var(--text-sm)/1.4 var(--font-mono);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--orange-text);
}
.section-head__eyebrow::before { content: ''; flex: none; width: 34px; height: 2px; background: var(--orange); }
.section-head__title {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  letter-spacing: var(--tracking-tight);
}
.section-head__lead {
  max-width: 60ch;
  margin-top: var(--space-4);
  font-size: 1.125rem;
  color: var(--ink-2);
}
