/* ============================================
   DISPLAY
   ============================================ */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* ============================================
   POSITION
   ============================================ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* ============================================
   FLEXBOX
   ============================================ */
.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%; }
.grow { flex-grow: 1; }
.grow-0 { flex-grow: 0; }
.shrink { flex-shrink: 1; }
.shrink-0 { flex-shrink: 0; }

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

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

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

.order-first { order: -9999; }
.order-last { order: 9999; }

/* ============================================
   GAPS
   ============================================ */
.gap-0 { gap: 0; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ============================================
   SPACING — MARGIN
   ============================================ */
.m-0  { margin: 0; }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }
.mx-sm { margin-left: var(--spacing-sm); margin-right: var(--spacing-sm); }
.mx-md { margin-left: var(--spacing-md); margin-right: var(--spacing-md); }
.mx-lg { margin-left: var(--spacing-lg); margin-right: var(--spacing-lg); }

.my-sm { margin-top: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.my-md { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-lg { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.ml-sm { margin-left: var(--spacing-sm); }
.ml-md { margin-left: var(--spacing-md); }
.ml-lg { margin-left: var(--spacing-lg); }
.mr-sm { margin-right: var(--spacing-sm); }
.mr-md { margin-right: var(--spacing-md); }
.mr-lg { margin-right: var(--spacing-lg); }

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

/* ============================================
   SPACING — PADDING
   ============================================ */
.p-0  { padding: 0; }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.px-sm { padding-left: var(--spacing-sm); padding-right: var(--spacing-sm); }
.px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-lg { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }

.py-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.px-xl { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
.py-xl { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

/* ============================================
   SIZING
   ============================================ */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-half { width: 50%; }
.w-1\/3 { width: 33.333%; }
.w-2\/3 { width: 66.667%; }
.w-1\/4 { width: 25%; }
.w-3\/4 { width: 75%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-screen-sm { height: 85vh; }
.h-auto { height: auto; }
.min-w-0 { min-width: 0; }
.min-h-screen { min-height: 100vh; }
.max-w-xs { max-width: 480px; }
.max-w-sm { max-width: 640px; }
.max-w-md { max-width: 768px; }
.max-w-lg { max-width: 1024px; }
.max-w-xl { max-width: 1200px; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

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

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.whitespace-nowrap { white-space: nowrap; }
.break-words { overflow-wrap: break-word; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.75; }

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

/* ============================================
   COLORS — TEXT
   ============================================ */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }
.text-inverted { color: var(--text-inverted); }

/* ============================================
   COLORS — BACKGROUND
   ============================================ */
.bg-primary { background-color: var(--color-primary); }
.bg-primary-subtle { background-color: color-mix(in srgb, var(--color-primary), transparent 94%); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-surface { background-color: var(--bg-surface); }
.bg-base { background-color: var(--bg-base); }
.bg-error { background-color: var(--color-error); }
.bg-success { background-color: var(--color-success); }
.bg-warning { background-color: var(--color-warning); }
.bg-info { background-color: var(--color-info); }
.bg-overlay { background-color: rgba(0, 0, 0, 0.15); }

/* ============================================
   VISIBILITY
   ============================================ */
.visible { visibility: visible; }
.invisible { visibility: 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-width: 0;
}
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ============================================
   OVERFLOW
   ============================================ */
.overflow-hidden { overflow: hidden; }
.overflow-clip { overflow: clip; }
.overflow-auto { overflow: auto; }
.overflow-visible { overflow: visible; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ============================================
   BORDERS
   ============================================ */
.border { border: 1px solid var(--border-base); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--border-base); }
.border-bottom { border-bottom: 1px solid var(--border-base); }
.border-left { border-left: 1px solid var(--border-base); }
.border-right { border-right: 1px solid var(--border-base); }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }
.rounded-0 { border-radius: 0; }

/* ============================================
   SHADOWS
   ============================================ */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-none { box-shadow: none; }

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

/* ============================================
   RESPONSIVE DISPLAY
   ============================================ */
@media (min-width: 640px) {
  .sm\:hidden { display: none; }
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
}
@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:flex { display: flex; }
}
@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:block { display: block; }
  .lg\:flex { display: flex; }
}

/* ============================================
   Z-INDEX
   ============================================ */
.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-auto { z-index: auto; }

/* ============================================
   FLOAT & CLEARFIX
   ============================================ */
.float-left { float: left; }
.float-right { float: right; }
.float-none { float: none; }
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* ============================================
   VERTICAL ALIGN
   ============================================ */
.align-baseline { vertical-align: baseline; }
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }
.align-text-top { vertical-align: text-top; }
.align-text-bottom { vertical-align: text-bottom; }

/* ============================================
   ASPECT RATIO
   ============================================ */
.ratio { position: relative; }
.ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-21x9 { aspect-ratio: 21 / 9; }

/* ============================================
   INTERACTIONS
   ============================================ */
.user-select-none { user-select: none; }
.user-select-all { user-select: all; }
.user-select-auto { user-select: auto; }
.pe-none { pointer-events: none; }
.pe-auto { pointer-events: auto; }

/* ============================================
   COLORED LINKS
   ============================================ */
.link-primary { color: var(--color-primary); }
.link-primary:hover { color: var(--color-primary-hover); }
.link-secondary { color: var(--color-secondary); }
.link-secondary:hover { color: var(--color-secondary-hover); }
.link-success { color: var(--color-success); }
.link-success:hover { opacity: 0.8; }
.link-error { color: var(--color-error); }
.link-error:hover { opacity: 0.8; }
.link-warning { color: var(--color-warning); }
.link-warning:hover { opacity: 0.8; }
.link-info { color: var(--color-info); }
.link-info:hover { opacity: 0.8; }

/* ============================================
   STRETCHED LINK
   ============================================ */
.stretched-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

/* ============================================
   MASK
   ============================================ */
.mask {
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.mask-squircle {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 0C20 0 0 20 0 100s20 100 100 100 100-20 100-100S180 0 100 0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 0C20 0 0 20 0 100s20 100 100 100 100-20 100-100S180 0 100 0Z'/%3E%3C/svg%3E");
}
.mask-circle { clip-path: circle(50%); }
.mask-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.mask-heart {
  clip-path: path('M100 180C60 140 0 100 0 60 0 27 27 0 60 0c20 0 30 10 40 20C110 10 120 0 140 0c33 0 60 27 60 60 0 40-60 80-100 120Z');
}
.mask-hexagon { clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.mask-star { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* ============================================
   OBJECT FIT
   ============================================ */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* ============================================
   REVEAL ANIMATIONS
   Parent sections should use overflow:hidden to
   prevent horizontal scrollbars from translateX.
   ============================================ */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal { opacity: 0; transform: translateY(3rem); }
.reveal-left { opacity: 0; transform: translateX(-4rem); }
.reveal-right { opacity: 0; transform: translateX(4rem); }
.reveal-scale { opacity: 0; transform: scale(0.92); }
.reveal.is-visible, .reveal-left.is-visible, .reveal-right.is-visible, .reveal-scale.is-visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
