/* ==================================================
   INDUSTRIAL AIR — Utility Classes
   Vanilla CSS utility layer (no framework dependency)
   ================================================== */

/* ==================================================
   POSITION & DISPLAY
   ================================================== */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.left-0 { left: 0; }
.top-1\/3 { top: 33.333%; }
.-top-20 { top: -5rem; }
.-right-20 { right: -5rem; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.pointer-events-none { pointer-events: none; }
.overflow-hidden { overflow: hidden; }
.isolate { isolation: isolate; }

/* ---- Display ---- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-grid { display: inline-grid; }
.hidden { display: none; }

/* ---- Flex direction ---- */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }

/* ---- Flex grow / shrink ---- */
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

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

/* ---- Justify content ---- */
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-items-center { justify-items: center; }

/* ---- Gap ---- */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ---- Wrap ---- */
.flex-wrap { flex-wrap: wrap; }
.flex-wrap-gap { gap: var(--space-sm); }

/* ==================================================
   GRID
   ================================================== */

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }

/* ---- Responsive grid ---- */
@media (min-width: 640px) {
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:flex-row { display: flex; flex-direction: row; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==================================================
    MAX WIDTH
    ================================================== */

.max-w-2xl { max-width: 40rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-full { max-width: 100%; }

/* ==================================================
    MIN HEIGHT
    ================================================== */

.min-h-screen { min-height: 100vh; }

/* ==================================================
    WIDTH & HEIGHT
    ================================================== */

.w-1 { width: 0.25rem; }
.w-2 { width: 0.5rem; }
.w-1\.5 { width: 0.375rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-72 { width: 18rem; }
.w-full { width: 100%; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-48 { height: 12rem; }
.h-72 { height: 18rem; }
.h-full { height: 100%; }

/* Arbitrary values */
.w-\[500px\] { width: 500px; }
.h-\[600px\] { height: 600px; }

/* ==================================================
   SPACING: MARGIN
   ================================================== */

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.m-0 { margin: 0; }

/* ==================================================
   SPACING: PADDING
   ================================================== */

.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-32 { padding-bottom: 8rem; }
.pt-8 { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }

/* ==================================================
   BORDER
   ================================================== */

.border { border: 1px solid var(--ia-line); }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-l { border-left-width: 1px; }
.border-r { border-right-width: 1px; }
.border-0 { border: 0; }
.border-outline-variant { border-color: var(--outline-variant); }
.border-outline-variant\/30 { border-color: color-mix(in srgb, var(--outline-variant) 30%, transparent); }
.border-outline-variant\/40 { border-color: color-mix(in srgb, var(--outline-variant) 40%, transparent); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-bl-full { border-bottom-left-radius: 9999px; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }

/* ==================================================
   BACKGROUND
   ================================================== */

.bg-surface { background-color: var(--surface); }
.bg-surface-low { background-color: var(--surface-low); }
.bg-surface-high { background-color: var(--surface-high); }
.bg-surface-lowest { background-color: var(--surface-lowest); }
.bg-tertiary { background-color: var(--tertiary); }
.bg-tertiary\/10 { background-color: color-mix(in srgb, var(--tertiary) 10%, transparent); }
.bg-tertiary\/100 { background-color: var(--tertiary); }
.bg-temp-hot { background-color: var(--temp-hot); }
.bg-turquoise { background-color: var(--ia-turquoise); }
.bg-royal-blue\/10 { background-color: color-mix(in srgb, var(--royal-blue) 10%, transparent); }
.bg-clip-text { background-clip: text; -webkit-background-clip: text; }
.text-gradient-brand {
  color: transparent;
  background: linear-gradient(90deg, var(--secondary-container), var(--tertiary), var(--tertiary-fixed));
  background-clip: text;
  -webkit-background-clip: text;
}

/* ==================================================
   TEXT COLOR
   ================================================== */

.text-on-surface { color: var(--on-surface); }
.text-on-surface-dim { color: var(--on-surface-dim); }
.text-on-surface-variant { color: var(--on-surface-variant); }
.text-on-surface-variant\/40 { color: color-mix(in srgb, var(--on-surface-variant) 40%, transparent); }
.text-tertiary { color: var(--tertiary); }
.text-temp-hot { color: var(--temp-hot); }
.text-turquoise { color: var(--ia-turquoise); }
.text-secondary-container { color: var(--secondary-container); }
.text-transparent { color: transparent; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-2xl { font-size: 1.5rem; }

/* ---- Text sizing (uses CSS variables from tokens.css) ---- */
.text-display-hero-mobile { font-size: var(--text-display-hero-mobile); }
.text-headline-xl-mobile { font-size: var(--text-headline-xl-mobile); }
.text-headline-xl { font-size: var(--text-headline-xl); }
.text-headline-sm { font-size: var(--text-headline-sm); }
.text-body-md { font-size: var(--text-body-md); }
.text-body-sm { font-size: var(--text-body-sm); }

/* ---- Responsive text ---- */
@media (min-width: 768px) {
  .md\:text-display-hero { font-size: var(--text-display-hero); }
  .md\:text-headline-xl { font-size: var(--text-headline-xl); }
}

/* ---- Typography ---- */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }

/* ==================================================
   OPACITY
   ================================================== */

.opacity-5 { opacity: 0.05; }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* ==================================================
   TRANSITIONS & ANIMATION
   ================================================== */

.transition-all { transition: all 0.2s var(--ia-ease); }
.transition-opacity { transition: opacity 0.2s var(--ia-ease); }
.transition-colors { transition: color 0.2s var(--ia-ease), background-color 0.2s var(--ia-ease), border-color 0.2s var(--ia-ease); }
.duration-2s { transition-duration: 0.2s; }
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.duration-700 { transition-duration: 0.7s; }
.ease-in-out { transition-timing-function: var(--ia-ease); }

/* Animation */
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================================================
   FILTERS
   ================================================== */

.filter { filter: none; }
.blur-sm { filter: blur(2px); }
.blur-md { filter: blur(4px); }
.blur-lg { filter: blur(8px); }
.blur-xl { filter: blur(24px); }
.blur-3xl { filter: blur(80px); }

/* ==================================================
   STATE VARIANTS
   ================================================== */

.hover\:text-tertiary:hover { color: var(--tertiary); }
.hover\:text-temp-hot:hover { color: var(--temp-hot); }
.hover\:text-turquoise:hover { color: var(--ia-turquoise); }
.hover\:text-on-surface:hover { color: var(--on-surface); }
.hover\:text-secondary-container:hover { color: var(--secondary-container); }
.active\:scale-90:active { transform: scale(0.9); }
.group:hover .group-hover\:opacity-50 { opacity: 0.5; }

/* ==================================================
   COMPONENT DECORATIONS
   ================================================== */

.machine-rim {
  position: relative;
  box-shadow:
    0 0 20px -8px rgba(0, 210, 255, 0.2),
    inset 0 1px 0 rgba(0, 210, 255, 0.15);
}

/* ==================================================
   REDUCED MOTION
   ================================================== */

@media (prefers-reduced-motion: reduce) {
  .transition-all,
  .transition-opacity,
  .transition-colors {
    transition: none !important;
  }
  .animate-pulse,
  .animate-spin {
    animation: none !important;
  }
}
