/* ==========================================================================
   EQUITY.SU — Utility Classes
   Version: 1.0
   ========================================================================== */

/* -------------------------------------------------------------------
   1. TYPOGRAPHY UTILITIES
   ------------------------------------------------------------------- */

.text-hero {
  font-size: var(--text-hero);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-section-title {
  font-size: var(--text-h1);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

.text-card-title {
  font-size: var(--text-h3);
  font-weight: var(--font-semibold);
  line-height: 1.3;
  color: var(--text-primary);
}

.text-body {
  font-size: var(--text-body);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.text-badge {
  font-size: var(--text-caption);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-primary);
}

/* Color */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-primary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }

/* Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }


/* -------------------------------------------------------------------
   2. LAYOUT UTILITIES
   ------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }
.container--xl { max-width: var(--container-xl); }

/* Flex */
.flex { display: flex; }
.flex-col { 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; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }


/* -------------------------------------------------------------------
   3. SPACING UTILITIES
   ------------------------------------------------------------------- */

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

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.mx-auto { margin-left: auto; margin-right: auto; }

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

.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }


/* -------------------------------------------------------------------
   4. BACKGROUND UTILITIES
   ------------------------------------------------------------------- */

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-elevated { background-color: var(--bg-elevated); }
.bg-surface { background-color: var(--bg-surface); }


/* -------------------------------------------------------------------
   5. BORDER UTILITIES
   ------------------------------------------------------------------- */

.border { border: 1px solid var(--border-default); }
.border-light { border: 1px solid var(--border-light); }
.border-accent { border: 1px solid var(--border-accent); }
.border-b { border-bottom: 1px solid var(--border-default); }

.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); }


/* -------------------------------------------------------------------
   6. ASPECT RATIOS
   ------------------------------------------------------------------- */

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-card { aspect-ratio: 4 / 3; }
.aspect-portrait { aspect-ratio: 3 / 4; }
.aspect-screenshot { aspect-ratio: 9 / 16; }


/* -------------------------------------------------------------------
   7. DISPLAY & VISIBILITY
   ------------------------------------------------------------------- */

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

/* Responsive hide/show */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .show-mobile-only { display: none !important; }
}


/* -------------------------------------------------------------------
   8. ACCESSIBILITY
   ------------------------------------------------------------------- */

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* 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-width: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: var(--text-on-accent);
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-skip-link);
  font-weight: var(--font-semibold);
}

.skip-link:focus {
  top: 0;
}


/* -------------------------------------------------------------------
   9. CURSOR
   ------------------------------------------------------------------- */

.cursor-pointer { cursor: pointer; }


/* -------------------------------------------------------------------
   10. OVERFLOW
   ------------------------------------------------------------------- */

.overflow-hidden { overflow: hidden; }
.overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


/* -------------------------------------------------------------------
   11. WIDTH
   ------------------------------------------------------------------- */

.w-full { width: 100%; }
.max-w-prose { max-width: 65ch; }
