/* =============================================================
   PROJECT PHOENIX — LOVELY JAISWAL WEBSITE
   FILE: assets/css/utilities.css
   PURPOSE: Reusable utility classes — layout, spacing, display,
            visibility, containers, grids, flexbox helpers.
   No design-specific values. Pure structural helpers only.
   ============================================================= */


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

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

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

.container--flush {
  padding-inline: 0;
}


/* -----------------------------------------------------------
   SECTION WRAPPER
   ----------------------------------------------------------- */
.section {
  padding-block: var(--section-padding-y);
  padding-inline: var(--section-padding-x);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }
.section--flush { padding-block: 0; }


/* -----------------------------------------------------------
   FLEXBOX HELPERS
   ----------------------------------------------------------- */
.flex              { display: flex; }
.flex-col          { display: flex; flex-direction: column; }
.flex-row          { display: flex; flex-direction: row;    }
.flex-wrap         { flex-wrap: wrap; }
.flex-nowrap       { flex-wrap: nowrap; }
.flex-1            { flex: 1; }
.flex-auto         { flex: auto; }
.flex-none         { flex: none; }

/* Alignment */
.items-start       { align-items: flex-start; }
.items-center      { align-items: center; }
.items-end         { align-items: flex-end; }
.items-stretch     { align-items: stretch; }
.items-baseline    { align-items: baseline; }

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

.self-start        { align-self: flex-start; }
.self-center       { align-self: center; }
.self-end          { align-self: flex-end; }
.self-stretch      { align-self: stretch; }

/* Gap helpers */
.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-8  { gap: var(--space-8);  }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }


/* -----------------------------------------------------------
   GRID HELPERS
   ----------------------------------------------------------- */
.grid { display: grid; }

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.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); }
.grid-cols-auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-cols-auto-md {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.grid-cols-auto-lg {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}


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


/* -----------------------------------------------------------
   SPACING — MARGIN
   ----------------------------------------------------------- */
.m-0  { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-inline: auto; }
.my-auto { margin-block: auto; }

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

.mb-2  { margin-bottom: var(--space-2);  }
.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); }
.mb-16 { margin-bottom: var(--space-16); }

.ml-auto { margin-left: auto;  }
.mr-auto { margin-right: auto; }


/* -----------------------------------------------------------
   SPACING — PADDING
   ----------------------------------------------------------- */
.p-0  { padding: 0; }
.p-2  { padding: var(--space-2);  }
.p-4  { padding: var(--space-4);  }
.p-6  { padding: var(--space-6);  }
.p-8  { padding: var(--space-8);  }
.p-10 { padding: var(--space-10); }
.p-12 { padding: var(--space-12); }

.px-4  { padding-inline: var(--space-4);  }
.px-6  { padding-inline: var(--space-6);  }
.px-8  { padding-inline: var(--space-8);  }
.py-4  { padding-block: var(--space-4);   }
.py-6  { padding-block: var(--space-6);   }
.py-8  { padding-block: var(--space-8);   }
.py-12 { padding-block: var(--space-12);  }
.py-16 { padding-block: var(--space-16);  }
.py-24 { padding-block: var(--space-24);  }


/* -----------------------------------------------------------
   WIDTH & HEIGHT
   ----------------------------------------------------------- */
.w-full    { width: 100%;      }
.w-screen  { width: 100vw;     }
.w-auto    { width: auto;      }
.w-fit     { width: fit-content; }

.h-full    { height: 100%;     }
.h-screen  { height: 100vh;    }
.h-auto    { height: auto;     }

.min-h-screen { min-height: 100vh; }
.max-w-full   { max-width: 100%;   }


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

.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-scroll   { overflow: scroll;   }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto   { overflow-y: auto;   }


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


/* -----------------------------------------------------------
   SHADOWS
   ----------------------------------------------------------- */
.shadow-xs   { box-shadow: var(--shadow-xs); }
.shadow-sm   { box-shadow: var(--shadow-sm); }
.shadow-md   { box-shadow: var(--shadow-md); }
.shadow-lg   { box-shadow: var(--shadow-lg); }
.shadow-xl   { box-shadow: var(--shadow-xl); }
.shadow-gold { box-shadow: var(--shadow-gold); }
.shadow-none { box-shadow: none; }


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


/* -----------------------------------------------------------
   CURSOR
   ----------------------------------------------------------- */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }


/* -----------------------------------------------------------
   USER SELECT
   ----------------------------------------------------------- */
.select-none { user-select: none; }
.select-all  { user-select: all;  }
.select-text { user-select: text; }


/* -----------------------------------------------------------
   POINTER EVENTS
   ----------------------------------------------------------- */
.pointer-none   { pointer-events: none;  }
.pointer-events { pointer-events: auto;  }


/* -----------------------------------------------------------
   ASPECT RATIO
   ----------------------------------------------------------- */
.ratio-square    { aspect-ratio: 1 / 1;    }
.ratio-video     { aspect-ratio: 16 / 9;   }
.ratio-portrait  { aspect-ratio: 3 / 4;    }
.ratio-landscape { aspect-ratio: 4 / 3;    }
.ratio-golden    { aspect-ratio: 1.618 / 1; }
.ratio-wide      { aspect-ratio: 21 / 9;   }


/* -----------------------------------------------------------
   OBJECT FIT
   ----------------------------------------------------------- */
.object-cover   { object-fit: cover;   }
.object-contain { object-fit: contain; }
.object-fill    { object-fit: fill;    }
.object-center  { object-position: center; }
.object-top     { object-position: top;    }


/* -----------------------------------------------------------
   BACKGROUND COLOURS (structural — semantic use)
   ----------------------------------------------------------- */
.bg-white   { background-color: var(--color-white);       }
.bg-off     { background-color: var(--color-neutral-50);  }
.bg-warm    { background-color: var(--color-neutral-100); }
.bg-dark    { background-color: var(--color-secondary);   }
.bg-darker  { background-color: var(--color-neutral-900); }
.bg-gold    { background-color: var(--color-primary);     }


/* -----------------------------------------------------------
   TRANSITIONS
   ----------------------------------------------------------- */
.transition-base {
  transition: all var(--duration-base) var(--ease-standard);
}
.transition-fast {
  transition: all var(--duration-fast) var(--ease-standard);
}
.transition-slow {
  transition: all var(--duration-slow) var(--ease-standard);
}


/* -----------------------------------------------------------
   ACCESSIBILITY — VISUALLY HIDDEN
   ----------------------------------------------------------- */
.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;
}

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* -----------------------------------------------------------
   TRUNCATE TEXT
   ----------------------------------------------------------- */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* -----------------------------------------------------------
   Z-INDEX HELPERS
   ----------------------------------------------------------- */
.z-below    { z-index: var(--z-below);    }
.z-base     { z-index: var(--z-base);     }
.z-raised   { z-index: var(--z-raised);   }
.z-dropdown { z-index: var(--z-dropdown); }
.z-sticky   { z-index: var(--z-sticky);   }
.z-overlay  { z-index: var(--z-overlay);  }
.z-modal    { z-index: var(--z-modal);    }


/* -----------------------------------------------------------
   DIVIDER
   ----------------------------------------------------------- */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-color-light);
  margin-block: var(--space-8);
}

.divider--gold {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-primary) 50%,
    transparent 100%
  );
  height: 1px;
}
