
/* ============================================================
   CAT ACADEMY IMIPAS — css/utilities.css
   VERSION 3.1 — UI/UX STABLE EDITION

   DESIGN SYSTEM:
   - Mobile-first
   - Dark/light theme
   - Responsive typography
   - Accessible interactions
   - Reduced motion support
   - Reusable atomic utilities

   OWNERSHIP:
   variables.css  = design tokens
   base.css       = HTML foundation
   layout.css     = layout, grid, spacing
   components.css = reusable UI components
   utilities.css  = atomic helpers

   KOMPATIBILITAS:
   - layout.css v5.0
   - base.css v3.1
   - variables.css v3.0
   - HTML / Vanilla JavaScript SPA

   ============================================================ */


/* ============================================================
   01. TEXT COLORS
   ============================================================ */

.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-tertiary {
  color: var(--text-tertiary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-inverse {
  color: var(--text-inverse) !important;
}

.text-brand {
  color: var(--text-brand) !important;
}

.text-link {
  color: var(--text-link) !important;
}

.text-success {
  color: var(--status-success-text, var(--color-success-500)) !important;
}

.text-warning {
  color: var(--status-warning-text, var(--color-warning-500)) !important;
}

.text-danger {
  color: var(--status-danger-text, var(--color-danger-500)) !important;
}

.text-info {
  color: var(--status-info-text, var(--color-info-500)) !important;
}

.text-white {
  color: var(--color-white, #ffffff) !important;
}

.text-black {
  color: var(--color-black, #000000) !important;
}

.text-inherit {
  color: inherit !important;
}

.text-current {
  color: currentColor !important;
}

.text-transparent {
  color: transparent !important;
}


/* ============================================================
   02. FONT SIZES
   ============================================================ */

.text-2xs {
  font-size: var(--fs-2xs);
}

.text-xs {
  font-size: var(--fs-xs);
}

.text-sm {
  font-size: var(--fs-sm);
}

.text-base {
  font-size: var(--fs-base);
}

.text-md {
  font-size: var(--fs-md);
}

.text-lg {
  font-size: var(--fs-lg);
}

.text-xl {
  font-size: var(--fs-xl);
}

.text-2xl {
  font-size: var(--fs-2xl);
}

.text-3xl {
  font-size: var(--fs-3xl);
}

.text-4xl {
  font-size: var(--fs-4xl);
}

.text-5xl {
  font-size: var(--fs-5xl);
}


/* ============================================================
   03. FONT WEIGHT & FAMILY
   ============================================================ */

.font-regular {
  font-weight: var(--fw-regular);
}

.font-medium {
  font-weight: var(--fw-medium);
}

.font-semibold {
  font-weight: var(--fw-semibold);
}

.font-bold {
  font-weight: var(--fw-bold);
}

.font-extrabold {
  font-weight: var(--fw-extrabold);
}

.font-sans {
  font-family: var(--font-sans);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-display {
  font-family: var(--font-display);
}

.italic {
  font-style: italic;
}

.not-italic {
  font-style: normal;
}


/* ============================================================
   04. LINE HEIGHT
   ============================================================ */

.leading-none {
  line-height: var(--lh-none, 1);
}

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

.leading-snug {
  line-height: var(--lh-snug);
}

.leading-normal {
  line-height: var(--lh-normal);
}

.leading-relaxed {
  line-height: var(--lh-relaxed);
}


/* ============================================================
   05. LETTER SPACING
   ============================================================ */

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

.tracking-normal {
  letter-spacing: var(--ls-normal);
}

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

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


/* ============================================================
   06. TEXT ALIGNMENT
   ============================================================ */

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

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

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

.text-justify {
  text-align: justify;
}

.text-start {
  text-align: start;
}

.text-end {
  text-align: end;
}

.align-baseline {
  vertical-align: baseline;
}

.align-top {
  vertical-align: top;
}

.align-middle {
  vertical-align: middle;
}

.align-bottom {
  vertical-align: bottom;
}


/* ============================================================
   07. TEXT TRANSFORM & DECORATION
   ============================================================ */

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

.underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.line-through {
  text-decoration: line-through;
}

.no-underline {
  text-decoration: none;
}

.decoration-brand {
  text-decoration-color: var(--accent-primary);
}


/* ============================================================
   08. TEXT OVERFLOW
   ============================================================ */

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

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

.line-clamp-none {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.break-normal {
  overflow-wrap: normal;
  word-break: normal;
}

.break-words {
  overflow-wrap: break-word;
}

.break-all {
  word-break: break-all;
}

.break-keep {
  word-break: keep-all;
}

.hyphens-auto {
  hyphens: auto;
}

.hyphens-none {
  hyphens: none;
}

.whitespace-normal {
  white-space: normal;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre {
  white-space: pre;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.whitespace-pre-line {
  white-space: pre-line;
}


/* ============================================================
   09. RESPONSIVE VISIBILITY
   ============================================================ */

.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.show-sm,
.show-md,
.show-lg,
.show-xl,
.show-mobile,
.show-desktop,
.show-tablet {
  display: none !important;
}

@media (min-width: 480px) {
  .hidden-sm {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hidden-md {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hidden-lg {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .hidden-xl {
    display: none !important;
  }
}

@media (max-width: 479.98px) {
  .hidden-xs-down {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .hidden-sm-down {
    display: none !important;
  }
}

@media (max-width: 1023.98px) {
  .hidden-md-down {
    display: none !important;
  }

  .show-mobile {
    display: revert !important;
  }
}

@media (max-width: 1279.98px) {
  .hidden-lg-down {
    display: none !important;
  }
}

@media (min-width: 480px) and (max-width: 767.98px) {
  .show-sm {
    display: revert !important;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .show-md,
  .show-tablet {
    display: revert !important;
  }
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
  .show-lg {
    display: revert !important;
  }
}

@media (min-width: 1280px) {
  .show-xl {
    display: revert !important;
  }
}

@media (min-width: 1024px) {
  .show-desktop {
    display: revert !important;
  }
}


/* ============================================================
   10. RESPONSIVE FLEX HELPERS
   ============================================================ */

@media (min-width: 768px) {
  .flex-md-row {
    flex-direction: row;
  }

  .flex-md-col {
    flex-direction: column;
  }

  .flex-md-wrap {
    flex-wrap: wrap;
  }

  .flex-md-nowrap {
    flex-wrap: nowrap;
  }

  .items-md-center {
    align-items: center;
  }

  .items-md-start {
    align-items: flex-start;
  }

  .justify-md-between {
    justify-content: space-between;
  }

  .justify-md-center {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .flex-lg-row {
    flex-direction: row;
  }

  .flex-lg-col {
    flex-direction: column;
  }

  .flex-lg-wrap {
    flex-wrap: wrap;
  }

  .items-lg-center {
    align-items: center;
  }

  .justify-lg-between {
    justify-content: space-between;
  }
}


/* ============================================================
   11. RESPONSIVE TYPOGRAPHY
   ============================================================ */

@media (min-width: 768px) {
  .text-md-xs { font-size: var(--fs-xs); }
  .text-md-sm { font-size: var(--fs-sm); }
  .text-md-base { font-size: var(--fs-base); }
  .text-md-lg { font-size: var(--fs-lg); }
  .text-md-xl { font-size: var(--fs-xl); }
  .text-md-2xl { font-size: var(--fs-2xl); }
  .text-md-3xl { font-size: var(--fs-3xl); }

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

@media (min-width: 1024px) {
  .text-lg-base { font-size: var(--fs-base); }
  .text-lg-lg { font-size: var(--fs-lg); }
  .text-lg-xl { font-size: var(--fs-xl); }
  .text-lg-2xl { font-size: var(--fs-2xl); }
  .text-lg-3xl { font-size: var(--fs-3xl); }
  .text-lg-4xl { font-size: var(--fs-4xl); }
  .text-lg-5xl { font-size: var(--fs-5xl); }

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


/* ============================================================
   12. KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-down {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  80%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes spin-full {
  to { transform: rotate(360deg); }
}


/* ============================================================
   13. ANIMATION UTILITIES
   ============================================================ */

.animate-fade-in {
  animation: fade-in var(--duration-slow) var(--ease-out) both;
}

.animate-fade-out {
  animation: fade-out var(--duration-slow) var(--ease-out) both;
}

.animate-slide-in-up {
  animation: slide-in-up var(--duration-slow) var(--ease-out) both;
}

.animate-slide-in-down {
  animation: slide-in-down var(--duration-slow) var(--ease-out) both;
}

.animate-slide-in-left {
  animation: slide-in-left var(--duration-slow) var(--ease-out) both;
}

.animate-slide-in-right {
  animation: slide-in-right var(--duration-slow) var(--ease-out) both;
}

.animate-scale-in {
  animation: scale-in var(--duration-base) var(--ease-spring, ease-out) both;
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out, ease-in-out) infinite;
}

.animate-bounce {
  animation: bounce 1.2s var(--ease-in-out, ease-in-out) infinite;
}

.animate-shake {
  animation: shake 0.5s var(--ease-out);
}

.animate-float {
  animation: float 3s var(--ease-in-out, ease-in-out) infinite;
}

.animate-spin {
  animation: spin-full 1s linear infinite;
}

.animate-ping {
  animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-delay-75 { animation-delay: 75ms; }
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-150 { animation-delay: 150ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-500 { animation-delay: 500ms; }
.animate-delay-700 { animation-delay: 700ms; }
.animate-delay-1000 { animation-delay: 1000ms; }

.duration-fast {
  animation-duration: var(--duration-fast);
}

.duration-base {
  animation-duration: var(--duration-base);
}

.duration-slow {
  animation-duration: var(--duration-slow);
}

.duration-slower {
  animation-duration: var(--duration-slower);
}

.animate-paused {
  animation-play-state: paused;
}

.animate-running {
  animation-play-state: running;
}


/* ============================================================
   14. TRANSITIONS
   ============================================================ */

.transition-none {
  transition: none !important;
}

.transition-all {
  transition: all var(--duration-base) var(--ease-out);
}

.transition-colors {
  transition:
    color var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.transition-transform {
  transition: transform var(--duration-base) var(--ease-out);
}

.transition-opacity {
  transition: opacity var(--duration-base) var(--ease-out);
}

.transition-shadow {
  transition: box-shadow var(--duration-base) var(--ease-out);
}


/* ============================================================
   15. TRANSFORM UTILITIES

   CSS transform composition menggunakan custom properties.
   Beberapa utility dapat digabungkan pada satu elemen.
   ============================================================ */

.rotate-0,
.rotate-45,
.rotate-90,
.rotate-180,
.rotate--45,
.rotate--90,
.scale-90,
.scale-95,
.scale-100,
.scale-105,
.scale-110,
.translate-x-0,
.translate-x-2,
.translate-x--2,
.translate-x-full,
.translate-x--full,
.translate-y-0,
.translate-y-2,
.translate-y--2,
.translate-y-full,
.translate-y--full {
  transform:
    translate(
      var(--util-translate-x, 0),
      var(--util-translate-y, 0)
    )
    rotate(var(--util-rotate, 0deg))
    scale(var(--util-scale, 1));
}

.rotate-0 { --util-rotate: 0deg; }
.rotate-45 { --util-rotate: 45deg; }
.rotate-90 { --util-rotate: 90deg; }
.rotate-180 { --util-rotate: 180deg; }
.rotate--45 { --util-rotate: -45deg; }
.rotate--90 { --util-rotate: -90deg; }

.scale-90 { --util-scale: 0.9; }
.scale-95 { --util-scale: 0.95; }
.scale-100 { --util-scale: 1; }
.scale-105 { --util-scale: 1.05; }
.scale-110 { --util-scale: 1.1; }

.translate-x-0 { --util-translate-x: 0; }
.translate-x-2 { --util-translate-x: var(--space-2); }
.translate-x--2 { --util-translate-x: calc(var(--space-2) * -1); }
.translate-x-full { --util-translate-x: 100%; }
.translate-x--full { --util-translate-x: -100%; }

.translate-y-0 { --util-translate-y: 0; }
.translate-y-2 { --util-translate-y: var(--space-2); }
.translate-y--2 { --util-translate-y: calc(var(--space-2) * -1); }
.translate-y-full { --util-translate-y: 100%; }
.translate-y--full { --util-translate-y: -100%; }

.origin-center { transform-origin: center; }
.origin-top { transform-origin: top; }
.origin-bottom { transform-origin: bottom; }
.origin-left { transform-origin: left; }
.origin-right { transform-origin: right; }


/* ============================================================
   16. BACKGROUND COLORS
   ============================================================ */

.bg-transparent {
  background-color: transparent !important;
}

.bg-app {
  background-color: var(--bg-app) !important;
}

.bg-surface {
  background-color: var(--bg-surface) !important;
}

.bg-surface-2 {
  background-color: var(--bg-surface-2) !important;
}

.bg-surface-3 {
  background-color: var(--bg-surface-3) !important;
}

.bg-elevated {
  background-color: var(--bg-elevated) !important;
}

.bg-muted {
  background-color: var(--bg-muted) !important;
}

.bg-hover {
  background-color: var(--bg-hover) !important;
}

.bg-active {
  background-color: var(--bg-active) !important;
}

.bg-brand {
  background-color: var(--accent-primary) !important;
}

.bg-brand-soft {
  background-color: var(--accent-subtle) !important;
}

.bg-success {
  background-color: var(--color-success-500) !important;
}

.bg-warning {
  background-color: var(--color-warning-500) !important;
}

.bg-danger {
  background-color: var(--color-danger-500) !important;
}

.bg-info {
  background-color: var(--color-info-500) !important;
}

.bg-success-soft {
  background-color: var(--status-success-bg, rgba(16,185,129,.12)) !important;
}

.bg-warning-soft {
  background-color: var(--status-warning-bg, rgba(245,158,11,.12)) !important;
}

.bg-danger-soft {
  background-color: var(--status-danger-bg, rgba(239,68,68,.12)) !important;
}

.bg-info-soft {
  background-color: var(--status-info-bg, rgba(59,130,246,.12)) !important;
}

.bg-white {
  background-color: var(--color-white, #ffffff) !important;
}

.bg-black {
  background-color: var(--color-black, #000000) !important;
}

.bg-gradient-brand {
  background-image: var(--accent-gradient) !important;
}

.bg-gradient-app {
  background-image: var(--bg-app-gradient) !important;
}

.bg-none {
  background-image: none !important;
}


/* ============================================================
   17. OPACITY
   ============================================================ */

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: .25; }
.opacity-40 { opacity: .4; }
.opacity-50 { opacity: .5; }
.opacity-60 { opacity: .6; }
.opacity-75 { opacity: .75; }
.opacity-90 { opacity: .9; }
.opacity-100 { opacity: 1; }


/* ============================================================
   18. BORDERS
   ============================================================ */

.border {
  border: 1px solid var(--border-default);
}

.border-0 {
  border: 0 !important;
}

.border-2 {
  border-width: 2px;
}

.border-t {
  border-top: 1px solid var(--border-default);
}

.border-b {
  border-bottom: 1px solid var(--border-default);
}

.border-l {
  border-left: 1px solid var(--border-default);
}

.border-r {
  border-right: 1px solid var(--border-default);
}

.border-t-0 { border-top: 0 !important; }
.border-b-0 { border-bottom: 0 !important; }
.border-l-0 { border-left: 0 !important; }
.border-r-0 { border-right: 0 !important; }

.border-subtle { border-color: var(--border-subtle); }
.border-default { border-color: var(--border-default); }
.border-strong { border-color: var(--border-strong); }
.border-brand { border-color: var(--border-brand); }

.border-success { border-color: var(--color-success-500); }
.border-warning { border-color: var(--color-warning-500); }
.border-danger { border-color: var(--color-danger-500); }
.border-transparent { border-color: transparent; }

.border-dashed { border-style: dashed; }
.border-dotted { border-style: dotted; }
.border-solid { border-style: solid; }


/* ============================================================
   19. BORDER RADIUS
   ============================================================ */

.rounded-none { border-radius: 0 !important; }
.rounded-xs { border-radius: var(--radius-xs); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-pill); }
.rounded-circle { border-radius: var(--radius-circle); }

.rounded-t-md {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.rounded-b-md {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.rounded-l-md {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.rounded-r-md {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}


/* ============================================================
   20. SHADOWS
   ============================================================ */

.shadow-none { box-shadow: none !important; }
.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-brand { box-shadow: var(--shadow-brand); }
.shadow-brand-lg { box-shadow: var(--shadow-brand-lg); }
.shadow-focus { box-shadow: var(--shadow-focus); }
.shadow-inset { box-shadow: var(--shadow-inset); }


/* ============================================================
   21. FILTERS
   ============================================================ */

.blur-none { filter: none !important; }
.blur-sm { filter: blur(4px); }
.blur { filter: blur(8px); }
.blur-lg { filter: blur(16px); }

.brightness-90 { filter: brightness(.9); }
.brightness-100 { filter: brightness(1); }
.brightness-110 { filter: brightness(1.1); }
.brightness-125 { filter: brightness(1.25); }

.grayscale-0 { filter: grayscale(0); }
.grayscale { filter: grayscale(100%); }

.saturate-0 { filter: saturate(0); }
.saturate-150 { filter: saturate(1.5); }

.backdrop-blur-none {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* ============================================================
   22. CURSOR & POINTER EVENTS
   ============================================================ */

.cursor-auto { cursor: auto; }
.cursor-default { cursor: default; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-wait { cursor: wait; }
.cursor-text { cursor: text; }
.cursor-move { cursor: move; }
.cursor-help { cursor: help; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }


/* ============================================================
   23. USER SELECTION & TOUCH
   ============================================================ */

.select-none {
  -webkit-user-select: none;
  user-select: none;
}

.select-text {
  -webkit-user-select: text;
  user-select: text;
}

.select-all {
  -webkit-user-select: all;
  user-select: all;
}

.select-auto {
  -webkit-user-select: auto;
  user-select: auto;
}

.touch-auto { touch-action: auto; }
.touch-none { touch-action: none; }
.touch-pan-y { touch-action: pan-y; }
.touch-pan-x { touch-action: pan-x; }
.touch-manipulation { touch-action: manipulation; }


/* ============================================================
   24. OBJECT FIT
   ============================================================ */

.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.object-fill { object-fit: fill; }
.object-none { object-fit: none; }
.object-scale-down { object-fit: scale-down; }

.object-top { object-position: top; }
.object-center { object-position: center; }
.object-bottom { object-position: bottom; }
.object-left { object-position: left; }
.object-right { object-position: right; }


/* ============================================================
   25. ASPECT RATIOS
   ============================================================ */

.aspect-auto { aspect-ratio: auto; }
.aspect-1-1 { aspect-ratio: 1 / 1; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-3-4 { aspect-ratio: 3 / 4; }
.aspect-3-2 { aspect-ratio: 3 / 2; }
.aspect-2-3 { aspect-ratio: 2 / 3; }
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-9-16 { aspect-ratio: 9 / 16; }
.aspect-21-9 { aspect-ratio: 21 / 9; }
.aspect-5-4 { aspect-ratio: 5 / 4; }


/* ============================================================
   26. Z-INDEX
   ============================================================ */

.z-auto { z-index: auto; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.z-base { z-index: var(--z-base); }
.z-dropdown { z-index: var(--z-dropdown); }
.z-sticky { z-index: var(--z-sticky); }
.z-fixed { z-index: var(--z-fixed); }
.z-overlay { z-index: var(--z-overlay); }
.z-modal { z-index: var(--z-modal); }
.z-toast { z-index: var(--z-toast); }
.z-tooltip { z-index: var(--z-tooltip); }


/* ============================================================
   27. SAFE AREA
   ============================================================ */

.pt-safe { padding-top: var(--safe-top, 0px); }
.pb-safe { padding-bottom: var(--safe-bottom, 0px); }
.pl-safe { padding-left: var(--safe-left, 0px); }
.pr-safe { padding-right: var(--safe-right, 0px); }

.px-safe {
  padding-left: var(--safe-left, 0px);
  padding-right: var(--safe-right, 0px);
}

.py-safe {
  padding-top: var(--safe-top, 0px);
  padding-bottom: var(--safe-bottom, 0px);
}

.p-safe {
  padding:
    var(--safe-top, 0px)
    var(--safe-right, 0px)
    var(--safe-bottom, 0px)
    var(--safe-left, 0px);
}

.mt-safe { margin-top: var(--safe-top, 0px); }
.mb-safe { margin-bottom: var(--safe-bottom, 0px); }


/* ============================================================
   28. SCROLL
   ============================================================ */

.scroll-auto { overflow: auto; }
.scroll-hidden { overflow: hidden; }

.scroll-x-auto {
  overflow-x: auto;
}

.scroll-y-auto {
  overflow-y: auto;
}

.scrollbar-hide,
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.scrollbar-thin {
  scrollbar-width: thin;
}

.scroll-smooth {
  scroll-behavior: smooth;
}

.scroll-native {
  scroll-behavior: auto;
}

.overscroll-auto { overscroll-behavior: auto; }
.overscroll-contain { overscroll-behavior: contain; }
.overscroll-none { overscroll-behavior: none; }

.overscroll-x-contain {
  overscroll-behavior-x: contain;
}

.overscroll-y-contain {
  overscroll-behavior-y: contain;
}


/* ============================================================
   29. ORDER & ALIGNMENT
   ============================================================ */

.order-first { order: -9999; }
.order-last { order: 9999; }
.order-0 { order: 0; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }

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

.justify-self-auto { justify-self: auto; }
.justify-self-start { justify-self: start; }
.justify-self-center { justify-self: center; }
.justify-self-end { justify-self: end; }
.justify-self-stretch { justify-self: stretch; }


/* ============================================================
   30. GRID SPANS
   ============================================================ */

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

.row-span-1 { grid-row: span 1 / span 1; }
.row-span-2 { grid-row: span 2 / span 2; }
.row-span-3 { grid-row: span 3 / span 3; }

@media (min-width: 768px) {
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-6 { grid-column: span 6 / span 6; }
}

@media (min-width: 1024px) {
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-6 { grid-column: span 6 / span 6; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}


/* ============================================================
   31. POSITION HELPERS
   ============================================================ */

.top-0 { top: 0; }
.top-full { top: 100%; }
.top-50 { top: 50%; }
.top-auto { top: auto; }

.bottom-0 { bottom: 0; }
.bottom-full { bottom: 100%; }
.bottom-50 { bottom: 50%; }

.left-0 { left: 0; }
.left-50 { left: 50%; }
.left-full { left: 100%; }

.right-0 { right: 0; }
.right-50 { right: 50%; }
.right-full { right: 100%; }

.center-xy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.inset-x-0 {
  left: 0;
  right: 0;
}

.inset-y-0 {
  top: 0;
  bottom: 0;
}


/* ============================================================
   32. LISTS & FLOATS
   ============================================================ */

.list-none {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.list-disc { list-style: disc; }
.list-decimal { list-style: decimal; }

.list-inside { list-style-position: inside; }
.list-outside { list-style-position: outside; }

.float-left { float: left; }
.float-right { float: right; }
.float-none { float: none; }

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.clear-both { clear: both; }
.clear-left { clear: left; }
.clear-right { clear: right; }


/* ============================================================
   33. SVG UTILITIES
   ============================================================ */

.stroke-current { stroke: currentColor; }
.stroke-brand { stroke: var(--accent-primary); }

.stroke-1 { stroke-width: 1; }
.stroke-2 { stroke-width: 2; }
.stroke-3 { stroke-width: 3; }

.fill-current { fill: currentColor; }
.fill-none { fill: none; }
.fill-brand { fill: var(--accent-primary); }


/* ============================================================
   34. SPACERS
   ============================================================ */

.spacer-1 { height: var(--space-1); }
.spacer-2 { height: var(--space-2); }
.spacer-3 { height: var(--space-3); }
.spacer-4 { height: var(--space-4); }
.spacer-6 { height: var(--space-6); }
.spacer-8 { height: var(--space-8); }
.spacer-12 { height: var(--space-12); }


/* ============================================================
   35. FLEX GROW / SHRINK
   ============================================================ */

.flex-grow { flex-grow: 1; }
.flex-grow-0 { flex-grow: 0; }

.flex-shrink { flex-shrink: 1; }
.flex-shrink-0 { flex-shrink: 0; }


/* ============================================================
   36. WIDTH & HEIGHT
   ============================================================ */

.w-auto { width: auto; }
.w-0 { width: 0; }
.w-fit { width: fit-content; }
.w-max { width: max-content; }
.w-min { width: min-content; }

.w-screen { width: 100vw; }
.w-dvw { width: 100dvw; }

.w-1-2 { width: 50%; }
.w-1-3 { width: 33.333333%; }
.w-2-3 { width: 66.666667%; }
.w-1-4 { width: 25%; }
.w-3-4 { width: 75%; }
.w-1-5 { width: 20%; }
.w-4-5 { width: 80%; }

.h-auto { height: auto; }
.h-0 { height: 0; }
.h-fit { height: fit-content; }

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

.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }

.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }

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

.min-h-dvh { min-height: 100dvh; }
.min-h-svh { min-height: 100svh; }
.min-h-lvh { min-height: 100lvh; }

.max-h-screen {
  max-height: 100vh;
  max-height: 100dvh;
}

.min-h-mobile {
  min-height:
    calc(
      100vh -
      var(--topbar-height, 60px) -
      var(--bottom-nav-height, 0px) -
      var(--safe-top, 0px) -
      var(--safe-bottom, 0px)
    );
}

@supports (height: 100dvh) {
  .min-h-mobile {
    min-height:
      calc(
        100dvh -
        var(--topbar-height, 60px) -
        var(--bottom-nav-height, 0px) -
        var(--safe-top, 0px) -
        var(--safe-bottom, 0px)
      );
  }
}


/* ============================================================
   37. TAP FEEDBACK
   ============================================================ */

.tap-feedback {
  -webkit-tap-highlight-color: transparent;

  touch-action: manipulation;

  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

@media (hover: hover) {
  .tap-feedback:hover {
    background-color: var(--bg-hover);
  }
}

.tap-feedback:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(.98);
  background-color: var(--bg-active);
}


/* ============================================================
   38. ACCESSIBILITY HELPERS
   ============================================================ */

.touch-target {
  min-width: 44px;
  min-height: 44px;
}

.focus-ring:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

.focus-ring-inset:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -3px;
}

.text-readable {
  max-width: 70ch;
  line-height: var(--lh-relaxed);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.break-anywhere {
  overflow-wrap: anywhere;
}


/* ============================================================
   39. HIGHLIGHT & TEXT STROKE
   ============================================================ */

.highlight-brand {
  background:
    linear-gradient(
      180deg,
      transparent 55%,
      var(--accent-subtle) 55%
    );

  padding: 0 2px;

  border-radius: var(--radius-xs);
}

.text-stroke-brand {
  -webkit-text-stroke: 1px var(--accent-primary);
  color: transparent;
}


/* ============================================================
   40. IMAGE WRAPPER
   ============================================================ */

.img-wrapper {
  position: relative;

  overflow: hidden;

  border-radius: var(--radius-md);

  background: var(--bg-surface-2);
}

.img-wrapper > img,
.img-wrapper > video,
.img-wrapper > iframe {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* ============================================================
   41. ISOLATION & BLEND
   ============================================================ */

.isolate { isolation: isolate; }
.isolation-auto { isolation: auto; }

.mix-blend-normal { mix-blend-mode: normal; }
.mix-blend-multiply { mix-blend-mode: multiply; }
.mix-blend-screen { mix-blend-mode: screen; }
.mix-blend-overlay { mix-blend-mode: overlay; }


/* ============================================================
   42. LINK HELPERS
   ============================================================ */

.link-plain {
  color: inherit;
  text-decoration: none;
}

.link-plain:hover {
  color: inherit;
  text-decoration: none;
}

.dot-separator::before {
  content: "·";
  margin: 0 var(--space-2);
  color: var(--text-muted);
}


/* ============================================================
   43. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-fade-out,
  .animate-slide-in-up,
  .animate-slide-in-down,
  .animate-slide-in-left,
  .animate-slide-in-right,
  .animate-scale-in,
  .animate-pulse,
  .animate-bounce,
  .animate-shake,
  .animate-float,
  .animate-spin,
  .animate-ping {
    animation: none !important;
  }

  .tap-feedback {
    transition: none !important;
  }

  .tap-feedback:active {
    transform: none !important;
  }

  .scroll-smooth {
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   44. PRINT HELPERS
   ============================================================ */

@media print {
  .print-hide,
  .no-print,
  .print\:hidden {
    display: none !important;
  }

  .print-show {
    display: block !important;
  }

  .animate-fade-in,
  .animate-fade-out,
  .animate-slide-in-up,
  .animate-slide-in-down,
  .animate-slide-in-left,
  .animate-slide-in-right,
  .animate-scale-in,
  .animate-pulse,
  .animate-bounce,
  .animate-shake,
  .animate-float,
  .animate-spin,
  .animate-ping {
    animation: none !important;
  }

  .shadow-none-print {
    box-shadow: none !important;
  }

  .bg-white-print {
    background: #ffffff !important;
  }

  .text-black-print {
    color: #000000 !important;
  }
}

/* ============================================================
   END — CAT ACADEMY IMIPAS UTILITIES v3.1
   ============================================================ */
