/* ==========================================================================
   Utility / Helper Classes
   ========================================================================== */

/* --- Smooth Scroll ------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

/* --- Base resets for cleaner rendering ----------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Typography helpers -------------------------------------------------- */
.text-xs    { font-size: var(--font-size-xs); }
.text-sm    { font-size: var(--font-size-sm); }
.text-base  { font-size: var(--font-size-base); }
.text-md    { font-size: var(--font-size-md); }
.text-lg    { font-size: var(--font-size-lg); }
.text-xl    { font-size: var(--font-size-xl); }
.text-2xl   { font-size: var(--font-size-2xl); }
.text-3xl   { font-size: var(--font-size-3xl); }
.text-4xl   { font-size: var(--font-size-4xl); }

.font-light    { font-weight: var(--font-weight-light); }
.font-regular  { font-weight: var(--font-weight-regular); }
.font-medium   { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold     { font-weight: var(--font-weight-bold); }

.leading-tight { line-height: var(--line-height-tight); }
.leading-base  { line-height: var(--line-height-base); }
.leading-loose { line-height: var(--line-height-loose); }

.tracking-tight  { letter-spacing: var(--letter-spacing-tight); }
.tracking-wide   { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider  { letter-spacing: var(--letter-spacing-wider); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

/* --- Color helpers ------------------------------------------------------- */
.text-primary   { color: var(--color-primary); }
.text-accent    { color: var(--color-accent); }
.text-muted     { color: var(--color-mid-gray); }
.text-white     { color: var(--color-white); }
.bg-primary     { background-color: var(--color-primary); }
.bg-accent      { background-color: var(--color-accent); }
.bg-off-white   { background-color: var(--color-off-white); }
.bg-dark        { background-color: var(--color-black); }

/* --- Spacing helpers ----------------------------------------------------- */
.mt-0  { margin-top: 0; }
.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-0  { margin-bottom: 0; }
.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); }
.pt-0  { padding-top: 0; }
.pt-8  { padding-top: var(--space-8); }
.pt-16 { padding-top: var(--space-16); }
.pt-24 { padding-top: var(--space-24); }
.pb-0  { padding-bottom: 0; }
.pb-8  { padding-bottom: var(--space-8); }
.pb-16 { padding-bottom: var(--space-16); }
.pb-24 { padding-bottom: var(--space-24); }

/* --- Layout helpers ------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: 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--2xl { max-width: var(--container-2xl); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-4   { gap: var(--space-4); }
.gap-6   { gap: var(--space-6); }
.gap-8   { gap: var(--space-8); }
.gap-12  { gap: var(--space-12); }

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

/* --- Visibility ---------------------------------------------------------- */
.hidden        { display: none !important; }
.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;
}
.overflow-hidden { overflow: hidden; }
.relative        { position: relative; }
.absolute        { position: absolute; }
.inset-0         { inset: 0; }

/* --- Borders & Radius ---------------------------------------------------- */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

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

/* --- Dividers ------------------------------------------------------------ */
.divider {
    border: none;
    border-top: 1px solid var(--color-light-gray);
    margin: var(--space-12) 0;
}

/* --- Gradient text ------------------------------------------------------- */
.gradient-text {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Aspect ratio helpers ------------------------------------------------ */
.aspect-square   { aspect-ratio: 1 / 1; }
.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 3 / 4; }
.object-cover    { object-fit: cover; object-position: center; }

/* --- Responsive grid breakdowns ----------------------------------------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .grid-4,
    .grid-3,
    .grid-2  { grid-template-columns: 1fr; }
    .flex-col-mobile { flex-direction: column; }
    .text-center-mobile { text-align: center; }
}
