/* ============================================================
   ArtHAUS — Component styles
   Classes consumed by the React primitives in /components.
   Quiet, architectural, gold used as a hairline accent only.
   ============================================================ */

/* ---------- Button ---------------------------------------- */
.ah-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-weight: var(--w-ui);
  font-size: var(--fs-ui);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink-900);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-5);
  height: 48px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.ah-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ah-btn:active { transform: translateY(1px); }
.ah-btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* primary — ink fill, gold-beam underline on hover */
.ah-btn--primary { color: var(--cream-50); background: var(--ink-900); border-color: var(--ink-900); }
.ah-btn--primary:hover { background: var(--ink-800); border-color: var(--ink-800); box-shadow: inset 0 -2px 0 var(--gold-500); }

/* gold — the rare emphatic action */
.ah-btn--gold { color: var(--ink-950); background: var(--gold-500); border-color: var(--gold-500); }
.ah-btn--gold:hover { background: var(--gold-400); border-color: var(--gold-400); }

/* secondary — hairline outline */
.ah-btn--secondary { color: var(--ink-900); background: transparent; border-color: var(--line-strong); }
.ah-btn--secondary:hover { border-color: var(--ink-900); box-shadow: inset 0 -2px 0 var(--gold-500); }

/* ghost — quietest */
.ah-btn--ghost { color: var(--ink-700); background: transparent; border-color: transparent; padding: 0 var(--space-3); }
.ah-btn--ghost:hover { color: var(--ink-950); background: var(--cream-100); }

/* on dark surfaces */
.ah-btn--on-dark.ah-btn--secondary { color: var(--cream-50); border-color: var(--line-on-dark); }
.ah-btn--on-dark.ah-btn--secondary:hover { border-color: var(--cream-50); }
.ah-btn--on-dark.ah-btn--ghost { color: var(--cream-100); }
.ah-btn--on-dark.ah-btn--ghost:hover { color: var(--white); background: color-mix(in srgb, var(--cream-50) 12%, transparent); }

.ah-btn--sm { height: 38px; font-size: var(--fs-sm); padding: 0 var(--space-4); }
.ah-btn--lg { height: 56px; padding: 0 var(--space-6); }
.ah-btn--block { width: 100%; }
.ah-btn__icon { display: inline-flex; width: 1em; height: 1em; }

/* ---------- Tag / chip ------------------------------------ */
.ah-tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-ui); font-weight: var(--w-ui);
  font-size: var(--fs-eyebrow); letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 6px var(--space-3); line-height: 1; background: transparent;
}
.ah-tag--solid { background: var(--cream-100); border-color: transparent; color: var(--ink-700); }
.ah-tag--gold { color: var(--gold-700); border-color: color-mix(in srgb, var(--gold-500) 45%, transparent); }
.ah-tag--on-dark { color: var(--cream-100); border-color: var(--line-on-dark); }

/* ---------- Badge (status dot + label) -------------------- */
.ah-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-ui); font-weight: var(--w-ui-med);
  font-size: var(--fs-sm); letter-spacing: var(--ls-ui);
  color: var(--text-body);
}
.ah-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-400); flex: none; }
.ah-badge--success .ah-badge__dot { background: var(--success); }
.ah-badge--warning .ah-badge__dot { background: var(--warning); }
.ah-badge--danger  .ah-badge__dot { background: var(--danger); }
.ah-badge--gold    .ah-badge__dot { background: var(--gold-500); }

/* ---------- Beam (signature rule) ------------------------- */
.ah-beam-el { display: inline-block; height: var(--border-beam); width: var(--space-7); background: var(--gold-500); border: 0; vertical-align: middle; }
.ah-beam-el--full { width: 100%; }
.ah-beam-el--ink { background: var(--ink-800); }

/* ---------- Avatar ---------------------------------------- */
.ah-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream-200); color: var(--ink-700);
  font-family: var(--font-ui); font-weight: var(--w-ui-med); font-size: var(--fs-sm);
  letter-spacing: var(--ls-ui); overflow: hidden; flex: none;
  border: 1px solid var(--line);
}
.ah-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ah-avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.ah-avatar--lg { width: 64px; height: 64px; font-size: var(--fs-ui); }

/* ---------- Field / Input / Textarea / Select ------------- */
.ah-field { display: flex; flex-direction: column; gap: var(--space-2); }
.ah-field__label {
  font-family: var(--font-ui); font-weight: var(--w-ui);
  font-size: var(--fs-eyebrow); letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: var(--text-muted);
}
.ah-field__hint { font-family: var(--font-ui); font-size: var(--fs-sm); color: var(--text-subtle); }
.ah-field__hint--error { color: var(--danger); }

.ah-input, .ah-textarea, .ah-select {
  font-family: var(--font-ui); font-weight: var(--w-ui-light);
  font-size: var(--fs-ui); letter-spacing: var(--ls-ui);
  color: var(--text-body); background: var(--surface-card);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 var(--space-4); height: 48px; width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.ah-textarea { height: auto; padding: var(--space-3) var(--space-4); line-height: var(--lh-snug); resize: vertical; min-height: 120px; }
.ah-input::placeholder, .ah-textarea::placeholder { color: var(--text-subtle); }
.ah-input:focus, .ah-textarea:focus, .ah-select:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.ah-input[aria-invalid="true"], .ah-textarea[aria-invalid="true"] { border-color: var(--danger); }
.ah-input[disabled], .ah-textarea[disabled], .ah-select[disabled] { background: var(--cream-100); color: var(--text-subtle); cursor: not-allowed; }
.ah-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-500) 50%), linear-gradient(135deg, var(--ink-500) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 14px) center;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  padding-right: var(--space-7);
}
.ah-field--underline .ah-input { border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding-left: 0; background: transparent; }
.ah-field--underline .ah-input:focus { box-shadow: none; border-bottom-color: var(--gold-500); }

/* ---------- Checkbox -------------------------------------- */
.ah-check { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--text-body); letter-spacing: var(--ls-ui); }
.ah-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ah-check__box {
  width: 20px; height: 20px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs); background: var(--surface-card);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.ah-check__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.ah-check input:checked + .ah-check__box { background: var(--ink-900); border-color: var(--ink-900); }
.ah-check input:checked + .ah-check__box svg { opacity: 1; transform: scale(1); stroke: var(--gold-400); }
.ah-check input:focus-visible + .ah-check__box { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Switch ---------------------------------------- */
.ah-switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--text-body); letter-spacing: var(--ls-ui); }
.ah-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ah-switch__track {
  width: 44px; height: 24px; border-radius: var(--radius-pill);
  background: var(--cream-300); border: 1px solid var(--line-strong);
  position: relative; flex: none; transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.ah-switch__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-sm); transition: transform var(--dur-med) var(--ease-out); }
.ah-switch input:checked + .ah-switch__track { background: var(--ink-900); border-color: var(--ink-900); }
.ah-switch input:checked + .ah-switch__track .ah-switch__thumb { transform: translateX(20px); background: var(--gold-400); }
.ah-switch input:focus-visible + .ah-switch__track { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Project card ---------------------------------- */
.ah-pcard { display: flex; flex-direction: column; background: transparent; text-decoration: none; color: inherit; group: card; }
.ah-pcard__media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--cream-200); border-radius: var(--radius-sm); }
.ah-pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.ah-pcard:hover .ah-pcard__media img { transform: scale(1.04); }
.ah-pcard__scrim { position: absolute; inset: 0; background: var(--scrim-bottom); opacity: 0; transition: opacity var(--dur-med) var(--ease-out); }
.ah-pcard:hover .ah-pcard__scrim { opacity: 1; }
.ah-pcard__index { position: absolute; top: var(--space-4); left: var(--space-4); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--cream-50); mix-blend-mode: difference; }
.ah-pcard__body { padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.ah-pcard__eyebrow { font-family: var(--font-ui); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
.ah-pcard__title { font-family: var(--font-display); font-style: italic; font-weight: var(--w-display); font-size: var(--fs-display-s); line-height: var(--lh-tight); color: var(--text-strong); }
.ah-pcard:hover .ah-pcard__title { color: var(--accent-strong); }
.ah-pcard__meta { font-family: var(--font-ui); font-size: var(--fs-sm); color: var(--text-subtle); letter-spacing: var(--ls-ui); }

/* ---------- Stat ------------------------------------------ */
.ah-stat { display: flex; flex-direction: column; gap: var(--space-2); }
.ah-stat__value { font-family: var(--font-display); font-style: italic; font-weight: var(--w-display); font-size: var(--fs-display-m); line-height: 1; color: var(--text-strong); }
.ah-stat__label { font-family: var(--font-ui); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
.ah-stat--gold .ah-stat__value { color: var(--gold-600); }

/* ---------- Blockquote ------------------------------------ */
.ah-quote { display: flex; flex-direction: column; gap: var(--space-5); max-width: 38ch; }
.ah-quote__text { font-family: var(--font-display); font-style: italic; font-weight: var(--w-display); font-size: var(--fs-display-s); line-height: var(--lh-snug); color: var(--text-strong); margin: 0; }
.ah-quote__cite { display: flex; align-items: center; gap: var(--space-3); font-style: normal; }
.ah-quote__cite-name { font-family: var(--font-ui); font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
