/* ==========================================================================
   OkulSeti - Utilities
   Single-purpose helper classes for spacing, layout, typography, visibility
   Spacing scale: 0=0, 1=4, 2=8, 3=12, 4=16, 5=24, 6=32, 8=48, 10=64 (px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Spacing — margin
   -------------------------------------------------------------------------- */
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mt-5  { margin-top: 24px; }
.mt-6  { margin-top: 32px; }
.mt-8  { margin-top: 48px; }
.mt-10 { margin-top: 64px; }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.mb-4  { margin-bottom: 16px; }
.mb-5  { margin-bottom: 24px; }
.mb-6  { margin-bottom: 32px; }
.mb-8  { margin-bottom: 48px; }
.mb-10 { margin-bottom: 64px; }

.ml-0  { margin-left: 0; }
.ml-1  { margin-left: 4px; }
.ml-2  { margin-left: 8px; }
.ml-3  { margin-left: 12px; }
.ml-4  { margin-left: 16px; }
.ml-5  { margin-left: 24px; }
.ml-6  { margin-left: 32px; }
.ml-auto { margin-left: auto; }

.mr-0  { margin-right: 0; }
.mr-1  { margin-right: 4px; }
.mr-2  { margin-right: 8px; }
.mr-3  { margin-right: 12px; }
.mr-4  { margin-right: 16px; }
.mr-5  { margin-right: 24px; }
.mr-6  { margin-right: 32px; }
.mr-auto { margin-right: auto; }

.mx-0  { margin-left: 0; margin-right: 0; }
.mx-1  { margin-left: 4px; margin-right: 4px; }
.mx-2  { margin-left: 8px; margin-right: 8px; }
.mx-3  { margin-left: 12px; margin-right: 12px; }
.mx-4  { margin-left: 16px; margin-right: 16px; }
.mx-5  { margin-left: 24px; margin-right: 24px; }
.mx-6  { margin-left: 32px; margin-right: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.my-0  { margin-top: 0; margin-bottom: 0; }
.my-1  { margin-top: 4px; margin-bottom: 4px; }
.my-2  { margin-top: 8px; margin-bottom: 8px; }
.my-3  { margin-top: 12px; margin-bottom: 12px; }
.my-4  { margin-top: 16px; margin-bottom: 16px; }
.my-5  { margin-top: 24px; margin-bottom: 24px; }
.my-6  { margin-top: 32px; margin-bottom: 32px; }
.my-8  { margin-top: 48px; margin-bottom: 48px; }
.my-10 { margin-top: 64px; margin-bottom: 64px; }

/* --------------------------------------------------------------------------
   Spacing — padding
   -------------------------------------------------------------------------- */
.p-0  { padding: 0; }
.p-1  { padding: 4px; }
.p-2  { padding: 8px; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 24px; }
.p-6  { padding: 32px; }
.p-8  { padding: 48px; }
.p-10 { padding: 64px; }

.px-0  { padding-left: 0; padding-right: 0; }
.px-1  { padding-left: 4px; padding-right: 4px; }
.px-2  { padding-left: 8px; padding-right: 8px; }
.px-3  { padding-left: 12px; padding-right: 12px; }
.px-4  { padding-left: 16px; padding-right: 16px; }
.px-5  { padding-left: 24px; padding-right: 24px; }
.px-6  { padding-left: 32px; padding-right: 32px; }

.py-0  { padding-top: 0; padding-bottom: 0; }
.py-1  { padding-top: 4px; padding-bottom: 4px; }
.py-2  { padding-top: 8px; padding-bottom: 8px; }
.py-3  { padding-top: 12px; padding-bottom: 12px; }
.py-4  { padding-top: 16px; padding-bottom: 16px; }
.py-5  { padding-top: 24px; padding-bottom: 24px; }
.py-6  { padding-top: 32px; padding-bottom: 32px; }
.py-8  { padding-top: 48px; padding-bottom: 48px; }
.py-10 { padding-top: 64px; padding-bottom: 64px; }

/* --------------------------------------------------------------------------
   Text alignment
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-justify{ text-align: justify; }

/* Typography helpers */
.text-xs    { font-size: 12px; }
.text-sm    { font-size: 14px; }
.text-base  { font-size: 16px; }
.text-lg    { font-size: 18px; }
.text-xl    { font-size: 22px; }
.text-2xl   { font-size: 28px; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold     { font-weight: var(--fw-bold); }
.font-heavy    { font-weight: var(--fw-heavy); }

.uppercase    { text-transform: uppercase; letter-spacing: 0.04em; }
.lowercase    { text-transform: lowercase; }
.capitalize   { text-transform: capitalize; }

.text-ink     { color: var(--color-brand-ink); }
.text-blue    { color: var(--color-brand-blue); }
.text-orange  { color: var(--color-brand-orange); }
.text-muted   { color: var(--color-muted-text); }
.text-white   { color: #fff; }
.text-error   { color: #DC2626; }
.text-success { color: var(--color-success-text); }

.leading-tight  { line-height: 1.2; }
.leading-normal { line-height: 1.5; }
.leading-loose  { line-height: 1.8; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Grid utilities (mobile-first: collapse to 1-col)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.grid--2-col,
.grid--3-col,
.grid--4-col {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid--2-col { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) {
  .grid--2-col { grid-template-columns: repeat(2, 1fr); }
  .grid--3-col { grid-template-columns: repeat(3, 1fr); }
  .grid--4-col { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
  .grid--4-col { grid-template-columns: repeat(4, 1fr); }
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
.gap-6 { gap: 32px; }
.gap-8 { gap: 48px; }

/* --------------------------------------------------------------------------
   Flex utilities
   -------------------------------------------------------------------------- */
.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.flex-col      { flex-direction: column; }
.flex-row      { flex-direction: row; }
.flex-wrap     { flex-wrap: wrap; }
.flex-nowrap   { flex-wrap: nowrap; }
.flex-1        { flex: 1 1 0%; }
.flex-auto     { flex: 1 1 auto; }
.flex-none     { flex: none; }

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

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

/* --------------------------------------------------------------------------
   Display utilities
   -------------------------------------------------------------------------- */
.hidden        { display: none !important; }
.block         { display: block; }
.inline-block  { display: inline-block; }
.inline        { display: inline; }

/* Responsive visibility */
.hide-mobile  { /* visible by default */ }
.show-mobile  { display: none; }

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

@media (max-width: 600px) {
  .hide-sm { display: none !important; }
}

/* --------------------------------------------------------------------------
   Accessibility — visually hidden (sr-only)
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-brand-blue);
  color: #fff;
  padding: 12px 16px;
  z-index: 2000;
  border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Sizing
   -------------------------------------------------------------------------- */
.full-width  { width: 100%; }
.full-height { height: 100%; }

.max-w-sm  { max-width: 380px; margin-left: auto; margin-right: auto; }
.max-w-md  { max-width: 480px; margin-left: auto; margin-right: auto; }
.max-w-lg  { max-width: 720px; margin-left: auto; margin-right: auto; }
.max-w-xl  { max-width: 960px; margin-left: auto; margin-right: auto; }

.w-auto { width: auto; }
.h-auto { height: auto; }

/* --------------------------------------------------------------------------
   Border / radius helpers
   -------------------------------------------------------------------------- */
.rounded     { border-radius: var(--radius-md); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-pill{ border-radius: var(--radius-pill); }
.rounded-none{ border-radius: 0; }

.border        { border: 1px solid var(--color-border); }
.border-input  { border: 1px solid var(--color-border-input); }
.border-0      { border: 0; }

/* --------------------------------------------------------------------------
   Background helpers
   -------------------------------------------------------------------------- */
.bg-white       { background: #fff; }
.bg-app         { background: var(--color-bg-app); }
.bg-soft        { background: var(--color-bg-soft); }
.bg-section-alt { background: var(--color-section-alt); }
.bg-hero        { background: var(--gradient-hero); }
.bg-transparent { background: transparent; }

/* --------------------------------------------------------------------------
   Shadow helpers
   -------------------------------------------------------------------------- */
.shadow-none { box-shadow: none; }
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-cta  { box-shadow: var(--shadow-cta); }

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

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

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