/* ============================================================
   04 COMPONENTS
   Reusable primitives: logo, nav, buttons, cards, badges,
   stats, avatars, media placeholders.
   Signature look: 2px ink border + hard offset shadow.
   ============================================================ */

/* ---------- Logo / wordmark ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--terracotta);
  color: var(--white);
  border: var(--border-rule) solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
  font-weight: var(--weight-black);
}

.logo__word {
  font-size: var(--text-xl);
}

.logo.on-ink {
  color: var(--paper);
}

.logo.on-ink .logo__mark {
  border-color: var(--paper);
}

.logo__img {
  height: 70px;
  width: auto;
  display: block;
}

@media (max-width: 900px) {
  .logo__img {
    height: 55px;
  }
}

@media (max-width: 600px) {
  .logo__img {
    height: 60px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: 1;
  padding: 0.95rem 1.5rem;
  background: var(--ink);
  /* default = ink */
  color: var(--paper);
  /* border: var(--border-rule) solid var(--ink); */
  border-radius: var(--radius-md);
  cursor: pointer;
  /* box-shadow: var(--shadow-hard-sm); */
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur) var(--ease-out);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--ochre);
  color: var(--white);
  border-color: var(--white);
}

.btn--secondary {
  background: var(--forest);
  color: var(--white);
  border-color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
  transform: none;
}

.btn--on-ink.btn--ghost {
  color: var(--paper);
  border-color: var(--paper);
}

.btn--on-ink.btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--lg {
  font-size: var(--text-lg);
  padding: 1.1rem 1.9rem;
}

.btn--block {
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: var(--border-rule) solid var(--ink);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-hard);
}

.card--flat {
  box-shadow: none;
}

.card--tint-clay {
  background: var(--terracotta-3);
}

.card--tint-forest {
  background: var(--forest-3);
}

.card--tint-ochre {
  background: var(--ochre-3);
}

.card--tint-indigo {
  background: var(--indigo-3);
}

/* ---------- Badge / tag ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: capitalize;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--ochre-3);
  color: var(--ink);
}

.badge--clay {
  background: var(--terracotta);
  color: #fff;
}

.badge--forest {
  background: var(--forest);
  color: #fff;
}

/* ---------- Stat ---------- */
.stat__num {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: clamp(2rem, 7vw, var(--text-5xl));
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

.stat__label {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--soot);
}

.section--ink .stat__num {
  color: var(--ochre);
}

.section--ink .stat__label {
  color: rgba(255, 252, 248, 0.7);
}

/* ---------- Avatar ---------- */
.avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  border: var(--border-rule) solid var(--ink);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
  color: var(--ink);
}

/* ---------- Media placeholder (no external images) ---------- */
.media {
  position: relative;
  border: var(--border-rule) solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 200px;
  color: var(--soot);
}

.media__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border: var(--border-hair) dashed var(--stone);
  border-radius: var(--radius-sm);
}

/* Tonal media fills for variety in galleries */
.media--clay {
  background: var(--terracotta-3);
}

.media--forest {
  background: var(--forest-3);
}

.media--ochre {
  background: var(--ochre-3);
}

.media--indigo {
  background: var(--indigo-3);
}

/* ---------- Real imagery (framed) ---------- */
.framed {
  border: var(--border-rule) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  background: var(--paper-2);
}

.framed img,
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media img {
  position: absolute;
  inset: 0;
}

.media:has(img) .media__tag {
  display: none;
}

/* Avatar with photo */
.avatar--photo {
  overflow: hidden;
  padding: 0;
  background: var(--paper-2);
}

.avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}