/* ═══════════════════════════════════════════════════════════
   AIM WebEngine — Utilities
   Grid, Flex, Spacing, Display
   ═══════════════════════════════════════════════════════════ */

@layer utilities {

/* ── Display ─────────────────────────────────────────── */

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* ── Flex Utilities ──────────────────────────────────── */

.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; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ── Gap ─────────────────────────────────────────────── */

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-7 { gap: var(--space-7); }
.gap-8 { gap: var(--space-8); }

/* ── Grid Utilities ──────────────────────────────────── */

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .lg\:grid-cols-1 { grid-template-columns: 1fr; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .md\:grid-cols-1 { grid-template-columns: 1fr; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:flex-col { flex-direction: column; }
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:text-center { text-align: center; }
}

@media (max-width: 480px) {
  .sm\:grid-cols-1 { grid-template-columns: 1fr; }
  .sm\:hidden { display: none; }
}

/* ── Spacing (Margin) ────────────────────────────────── */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mx-auto { margin-inline: auto; }

/* ── Spacing (Padding) ───────────────────────────────── */

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.px-2 { padding-inline: var(--space-2); }
.px-4 { padding-inline: var(--space-4); }
.px-6 { padding-inline: var(--space-6); }

.py-4 { padding-block: var(--space-4); }
.py-6 { padding-block: var(--space-6); }
.py-8 { padding-block: var(--space-8); }

/* ── Text ────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.font-bold { font-weight: var(--weight-bold); }
.font-semibold { font-weight: var(--weight-semibold); }

.text-muted { color: var(--color-text-muted); }
.text-subtle { color: var(--color-text-subtle); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-white { color: #fff; }
.text-white-85 { color: rgba(255, 255, 255, 0.85); }
.text-white-65 { color: rgba(255, 255, 255, 0.65); }
.text-white-40 { color: rgba(255, 255, 255, 0.4); }
.text-white-75 { color: rgba(255, 255, 255, 0.75); }

/* ── Width / Height ──────────────────────────────────── */

.w-full { width: 100%; }
.max-w-prose { max-width: 65ch; }
.max-w-lg { max-width: 800px; }
.max-w-xl { max-width: 1024px; }
.max-w-sm { max-width: 600px; }
.max-w-md { max-width: 700px; }
.max-w-narrow { max-width: 380px; }
.max-w-32ch { max-width: 32ch; }

/* ── Position ────────────────────────────────────────── */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.z-0 { z-index: var(--z-base); }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.z-10 { z-index: var(--z-above); }
.z-50 { z-index: var(--z-nav); }

/* ── Opacity ────────────────────────────────────────── */

.opacity-75 { opacity: 0.75; }

/* ── Aspect Ratio ───────────────────────────────────── */

.aspect-4-3 { aspect-ratio: 4/3; }
.aspect-3-4 { aspect-ratio: 3/4; }
.aspect-16-9 { aspect-ratio: 16/9; }
.aspect-1-1 { aspect-ratio: 1/1; }

/* ── Overflow ────────────────────────────────────────── */

.overflow-hidden { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }

/* ── Visibility ──────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Pointer ─────────────────────────────────────────── */

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }

} /* end @layer utilities */
