/* ==========================================================================
   UTILITIES — Helper classes for spacing, display, typography
   ========================================================================== */

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-subtle { color: var(--color-text-subtle); }
.text-accent { color: var(--color-accent); }
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.1em; }

/* Spacing */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Width */
.w-full { width: 100%; }
.max-w-prose { max-width: 65ch; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }

/* Pointer */
.pointer-events-none { pointer-events: none; }

/* Z-index */
.z-10 { z-index: 10; }

/* Aspect ratio */
.aspect-square { aspect-ratio: 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 3 / 4; }

/* Image cover */
.object-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  border: 1px solid transparent;
}

.badge--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

/* Counter */
.counter {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.counter__suffix {
  font-size: 0.6em;
  color: var(--color-accent);
}

/* Tag */
.tag {
  padding: 0.4rem 0.9rem;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: border-color var(--duration-fast) ease,
              color var(--duration-fast) ease;
}

.tag:hover,
.tag.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Icon size */
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }
