/* ============================================================
   SUPREME CONTROLS — UTILITY CLASSES
   Layout helpers: container, flex, grid, spacing.
   Keep selectors single-class only.
   ============================================================ */

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: var(--container-outer);
}

.container--narrow {
  max-width: 800px;
}

/* ── Section wrapper ─────────────────────────────────────── */
.section {
  padding-block: var(--section-pad);
}

.section--sm {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: calc(var(--section-pad) * 1.33);
}

.section--flush-top {
  padding-top: 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

.section--surface {
  background-color: var(--color-zinc-50);
}

/* ── Grid ────────────────────────────────────────────────── */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

/* ── Flex ────────────────────────────────────────────────── */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* ── Gap ─────────────────────────────────────────────────── */
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }

/* ── Align items ─────────────────────────────────────────── */
.items-end { align-items: flex-end; }

/* ── Align self ──────────────────────────────────────────── */
.self-start { align-self: flex-start; }

/* ── Margin top ──────────────────────────────────────────── */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-20 { margin-top: var(--space-20); }

/* ── Margin bottom ───────────────────────────────────────── */
.mb-10 { margin-bottom: var(--space-10); }

/* ── Max width ───────────────────────────────────────────── */
.mw-640 { max-width: 640px; }

/* ── Cursor ──────────────────────────────────────────────── */
.cursor-default { cursor: default; }

/* ── Text alignment ──────────────────────────────────────── */
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ── Text colors ─────────────────────────────────────────── */
.text-muted   { color: var(--color-text-muted); }
.text-light   { color: var(--color-text-light); }
.text-brand   { color: var(--color-brand); }
.text-white   { color: var(--color-white); }

/* ── Display ─────────────────────────────────────────────── */
.hidden       { display: none; }
.block        { display: block; }
.inline-block { display: inline-block; }

/* ── Width / Height ──────────────────────────────────────── */
.w-full  { width: 100%; }
.h-full  { height: 100%; }

/* ── Overflow ────────────────────────────────────────────── */
.overflow-hidden { overflow: hidden; }

/* ── Position ────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
}

/* ── Section label (small eyebrow text) ──────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-brand);
}

.section-label::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand);
  flex-shrink: 0;
  animation: brand-pulse-ring 3s ease-in-out infinite;
}

/* ── Section header block ────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-16);
}

.section-header--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header .section-label {
  margin-bottom: var(--space-4);
}

.section-header p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 56ch;
}

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