/* ═══════════════════════════════════════
   UTILITIES — Single-purpose reusable classes
   ═══════════════════════════════════════ */

/* ── DISPLAY ──────────────── */
.y-u-flex,
.flex {
  display: flex;
}

.y-u-flex-col,
.flex-col {
  display: flex;
  flex-direction: column;
}

.y-u-flex-row,
.flex-row {
  display: flex;
  flex-direction: row;
}

.y-u-grid,
.grid {
  display: grid;
}

.y-u-block,
.block {
  display: block;
}

.y-u-inline {
  display: inline;
}

.y-u-inline-flex,
.inline-flex {
  display: inline-flex;
}

.y-u-hidden,
.hidden {
  display: none;
}

/* ── FLEX UTILITIES ──────── */
.y-u-flex-wrap,
.flex-wrap {
  flex-wrap: wrap;
}

.y-u-flex-1,
.flex-1 {
  flex: 1;
}

.y-u-shrink-0,
.shrink-0 {
  flex-shrink: 0;
}

/* ── ALIGNMENT ────────────── */
.y-u-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.y-u-items-center,
.items-center {
  align-items: center;
}

.y-u-items-start,
.items-start {
  align-items: flex-start;
}

.y-u-between,
.justify-between {
  justify-content: space-between;
}

.y-u-justify-center,
.justify-center {
  justify-content: center;
}

.y-u-text-center,
.text-center {
  text-align: center;
}

.y-u-text-right,
.text-right {
  text-align: right;
}

.y-u-text-left {
  text-align: left;
}

/* ── SIZING ───────────────── */
.y-u-w-full,
.w-full {
  width: 100%;
}

.y-u-h-full {
  height: 100%;
}

.y-u-w-screen {
  width: 100vw;
}

.y-u-h-screen {
  height: 100vh;
}

/* ── SPACING — GAPS ──────── */
.gap-1 {
  gap: var(--y-space-xs);
}

.gap-2 {
  gap: var(--y-space-s);
}

.gap-3 {
  gap: var(--y-space-m);
}

.gap-4 {
  gap: var(--y-space-l);
}

.gap-6 {
  gap: var(--y-space-xxl);
}

.gap-8 {
  gap: var(--y-space-3xl);
}

/* ── SPACING ──────────────── */
.y-u-m-0 {
  margin: 0;
}

.y-u-p-0 {
  padding: 0;
}

/* ── OVERFLOW ─────────────── */
.y-u-overflow-hidden,
.overflow-hidden {
  overflow: hidden;
}

.y-u-overflow-auto {
  overflow: auto;
}

.y-u-overflow-scroll {
  overflow: scroll;
}

/* ── POSITION ─────────────── */
.y-u-relative,
.relative {
  position: relative;
}

.y-u-absolute,
.absolute {
  position: absolute;
}

.y-u-fixed {
  position: fixed;
}

.y-u-sticky {
  position: sticky;
}

/* ── CURSOR ───────────────── */
.y-u-pointer {
  cursor: pointer;
}

/* ── VISUAL ───────────────── */
.y-u-rounded {
  border-radius: var(--y-radius-l);
}

.y-u-shadow {
  box-shadow: var(--y-shadow-m);
}

.y-u-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── BORDER / RADIUS / SHADOWS ── */
.rounded-lg {
  border-radius: var(--y-radius-l);
}

.rounded-xl {
  border-radius: var(--y-radius-xl);
}

.rounded-2xl {
  border-radius: var(--y-radius-2xl);
}

.rounded-full {
  border-radius: var(--y-radius-full);
}

.border {
  border: 1px solid var(--y-color-border);
}

.border-t {
  border-top: 1px solid var(--y-color-border);
}

.border-2 {
  border-width: 2px;
  border-style: solid;
}

.shadow-sm {
  box-shadow: var(--y-shadow-s);
}

.shadow-md {
  box-shadow: var(--y-shadow-m);
}

.shadow-xl {
  box-shadow: var(--y-shadow-l);
}

/* ── GRID PRESETS ──────────── */
.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-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* ── CONTAINER ─────────────── */
.container {
  max-width: var(--y-container-max);
  margin: 0 auto;
  padding: 0 var(--y-space-l);
}

/* ── SECTION ───────────────── */
.section {
  padding: var(--y-space-6xl) 0;
}

.section-warm {
  background: linear-gradient(to bottom, var(--y-color-bg-subtle), var(--y-color-bg));
}

/* ── ANIMATIONS ────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════
   RESPONSIVE STYLES
   ═══════════════════════════════════════ */

@media (min-width: 640px) {
  .container {
    padding: 0 var(--y-space-xxl);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--y-space-3xl);
  }
}

@media (max-width: 1200px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .lg-grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .y-u-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .y-u-flex-col-sm {
    flex-direction: column;
  }

  .sm-hidden {
    display: none;
  }
}

@media (max-width: 640px) {

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .grid-2-keep {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--y-space-m);
  }
}