/* ============================================================
   UTILITY CLASSES — VisionForge Technologies
   Single-purpose helper classes. Use sparingly in markup.
   ============================================================ */

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

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

.container--wide {
  max-width: 1440px;
}

.container--fluid {
  max-width: 100%;
}

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

.section--sm {
  padding-block: var(--section-pad-y-sm);
}

.section--lg {
  padding-block: clamp(var(--space-12), 12vw, var(--space-24));
}

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

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

/* ─────────────────────────────────────────────
   GRID
───────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.grid--auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--gap-sm { gap: var(--space-3); }
.grid--gap-md { gap: var(--space-6); }
.grid--gap-lg { gap: var(--space-8); }

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

.flex--row    { flex-direction: row; }
.flex--col    { flex-direction: column; }
.flex--wrap   { flex-wrap: wrap; }
.flex--nowrap { flex-wrap: nowrap; }

.flex--center      { align-items: center; justify-content: center; }
.flex--between     { justify-content: space-between; }
.flex--around      { justify-content: space-around; }
.flex--start       { justify-content: flex-start; }
.flex--end         { justify-content: flex-end; }
.flex--align-start { align-items: flex-start; }
.flex--align-end   { align-items: flex-end; }

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

.flex-1   { flex: 1; }
.flex-auto{ flex: auto; }
.flex-none{ flex: none; }
.shrink-0 { flex-shrink: 0; }

/* ─────────────────────────────────────────────
   DISPLAY
───────────────────────────────────────────── */
.block         { display: block; }
.inline-block  { display: inline-block; }
.inline        { display: inline; }
.inline-flex   { display: inline-flex; }
.grid-display  { display: grid; }
.hidden        { display: none; }
.invisible     { visibility: hidden; }
.visible       { visibility: visible; }

/* Screen reader only */
.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;
}

/* ─────────────────────────────────────────────
   POSITION
───────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.inset-0  { inset: 0; }
.top-0    { top: 0; }
.bottom-0 { bottom: 0; }
.left-0   { left: 0; }
.right-0  { right: 0; }

/* ─────────────────────────────────────────────
   OVERFLOW
───────────────────────────────────────────── */
.overflow-hidden   { overflow: hidden; }
.overflow-auto     { overflow: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto   { overflow-y: auto; }

/* ─────────────────────────────────────────────
   TEXT ALIGNMENT
───────────────────────────────────────────── */
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ─────────────────────────────────────────────
   TEXT TRANSFORMS
───────────────────────────────────────────── */
.uppercase   { text-transform: uppercase; }
.lowercase   { text-transform: lowercase; }
.capitalize  { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ─────────────────────────────────────────────
   TEXT STYLES
───────────────────────────────────────────── */
.italic      { font-style: italic; }
.not-italic  { font-style: normal; }
.underline   { text-decoration: underline; }
.no-underline{ text-decoration: none; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-word  { overflow-wrap: break-word; word-break: break-word; }
.no-select   { user-select: none; }
.pointer     { cursor: pointer; }

/* ─────────────────────────────────────────────
   FONT SIZES
───────────────────────────────────────────── */
.text-2xs   { font-size: var(--text-2xs); }
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-md    { font-size: var(--text-md); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }
.text-5xl   { font-size: var(--text-5xl); }
.text-6xl   { font-size: var(--text-6xl); }
.text-7xl   { font-size: var(--text-7xl); }

/* ─────────────────────────────────────────────
   FONT WEIGHTS
───────────────────────────────────────────── */
.font-regular   { font-weight: var(--font-regular); }
.font-medium    { font-weight: var(--font-medium); }
.font-semibold  { font-weight: var(--font-semibold); }
.font-bold      { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

/* ─────────────────────────────────────────────
   TEXT COLORS
───────────────────────────────────────────── */
.text-primary    { color: var(--color-text-primary); }
.text-secondary  { color: var(--color-text-secondary); }
.text-tertiary   { color: var(--color-text-tertiary); }
.text-muted      { color: var(--color-text-muted); }
.text-brand      { color: var(--color-text-brand); }
.text-success    { color: var(--color-success); }
.text-warning    { color: var(--color-warning); }
.text-error      { color: var(--color-error); }

/* ─────────────────────────────────────────────
   BACKGROUND COLORS
───────────────────────────────────────────── */
.bg-base     { background-color: var(--color-bg-base); }
.bg-surface  { background-color: var(--color-bg-surface); }
.bg-elevated { background-color: var(--color-bg-elevated); }
.bg-brand    { background: var(--gradient-brand); }

/* ─────────────────────────────────────────────
   BORDER
───────────────────────────────────────────── */
.border        { border: 1px solid var(--color-border-default); }
.border-subtle { border: 1px solid var(--color-border-subtle); }
.border-strong { border: 1px solid var(--color-border-strong); }
.border-brand  { border: 1px solid var(--color-border-brand); }
.border-none   { border: none; }

.border-t { border-top: 1px solid var(--color-border-default); }
.border-b { border-bottom: 1px solid var(--color-border-default); }
.border-l { border-left: 1px solid var(--color-border-default); }
.border-r { border-right: 1px solid var(--color-border-default); }

/* ─────────────────────────────────────────────
   BORDER RADIUS
───────────────────────────────────────────── */
.rounded-none { border-radius: var(--radius-none); }
.rounded-xs   { border-radius: var(--radius-xs); }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-2xl  { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ─────────────────────────────────────────────
   WIDTH & HEIGHT
───────────────────────────────────────────── */
.w-full    { width: 100%; }
.w-auto    { width: auto; }
.w-fit     { width: fit-content; }
.h-full    { height: 100%; }
.h-auto    { height: auto; }
.h-screen  { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.max-w-full   { max-width: 100%; }

/* ─────────────────────────────────────────────
   SPACING UTILITIES
───────────────────────────────────────────── */

/* Margin */
.m-auto    { margin: auto; }
.mx-auto   { margin-inline: auto; }
.my-auto   { margin-block: auto; }

.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.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); }
.mt-12 { margin-top: var(--space-12); }

.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

/* Padding */
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

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

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

/* ─────────────────────────────────────────────
   OPACITY
───────────────────────────────────────────── */
.opacity-0    { opacity: 0; }
.opacity-25   { opacity: 0.25; }
.opacity-50   { opacity: 0.50; }
.opacity-75   { opacity: 0.75; }
.opacity-100  { opacity: 1; }

/* ─────────────────────────────────────────────
   Z-INDEX
───────────────────────────────────────────── */
.z-0    { z-index: 0; }
.z-10   { z-index: 10; }
.z-100  { z-index: 100; }
.z-200  { z-index: 200; }

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

.divider--subtle {
  background: var(--color-border-subtle);
}

/* ─────────────────────────────────────────────
   GRADIENT TEXT
───────────────────────────────────────────── */
.text-gradient {
  background: var(--gradient-text-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─────────────────────────────────────────────
   ANIMATE TRIGGER (JS controlled)
───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.fade-in[data-delay="100"] { transition-delay: 100ms; }
.fade-in[data-delay="200"] { transition-delay: 200ms; }
.fade-in[data-delay="300"] { transition-delay: 300ms; }
.fade-in[data-delay="400"] { transition-delay: 400ms; }
.fade-in[data-delay="500"] { transition-delay: 500ms; }
.fade-in[data-delay="600"] { transition-delay: 600ms; }
.fade-in[data-delay="700"] { transition-delay: 700ms; }
.fade-in[data-delay="800"] { transition-delay: 800ms; }
