@layer utilities {

    .hidden {
        display: none !important;
    }

    .block {
        display: block;
    }

    .inline-block {
        display: inline-block;
    }

    .inline {
        display: inline;
    }

    [x-cloak] {
        display: none !important;
    }

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

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

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

    .flex-auto {
        flex: 1 1 auto;
    }

    .flex-none {
        flex: none;
    }

    .grow {
        flex-grow: 1;
    }

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

    .relative {
        position: relative;
    }

    .absolute {
        position: absolute;
    }

    .fixed {
        position: fixed;
    }

    .sticky {
        position: sticky;
        top: 0;
    }

    .inset-0 {
        inset: 0;
    }

    .w-full {
        width: 100%;
    }

    .h-full {
        height: 100%;
    }

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

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

    .max-w-full {
        max-width: 100%;
    }

    .max-w-75 {
        max-width: 800px;
    }

    .overflow-hidden {
        overflow: hidden;
    }

    .overflow-auto {
        overflow: auto;
    }

    .object-cover {
        object-fit: cover;
    }

    .object-contain {
        object-fit: contain;
    }

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

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

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

    .uppercase {
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .capitalize {
        text-transform: capitalize;
    }

    .italic {
        font-style: italic;
    }

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

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

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

    .opacity-0 {
        opacity: 0;
    }

    .opacity-50 {
        opacity: 0.5;
    }

    .opacity-100 {
        opacity: 1;
    }

    .cursor-pointer {
        cursor: pointer;
    }

    .cursor-not-allowed {
        cursor: not-allowed;
    }

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

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

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

    .text-white {
        color: #FFFFFF;
    }

    /* --- CUBE CSS: TAMAÑOS DE LETRA (HG Fonts) --- */
    .text-xs {
        font-size: var(--hg-font-xs);
    }
    .text-s {
        font-size: var(--hg-font-s);
    }
    .text-m {
        font-size: var(--hg-font-m);
    }
    .text-l {
        font-size: var(--hg-font-l);
    }
    .text-xl {
        font-size: var(--hg-font-xl);
    }
    .text-2xl {
        font-size: var(--hg-font-2xl);
    }

    /* --- CUBE CSS: COLORES DE TEXTO (HG Colors) --- */
    .text-brand {
        color: var(--hg-brand);
    }
    .text-brand-on {
        color: var(--hg-brand-on);
    }
    .text-brand-soft-on {
        color: var(--hg-brand-soft-on);
    }
    .text-accent {
        color: var(--hg-accent);
    }
    .text-accent-on {
        color: var(--hg-accent-on);
    }
    .text-accent-soft-on {
        color: var(--hg-accent-soft-on);
    }
    .text-main {
        color: var(--hg-text-main);
    }
    .text-muted {
        color: var(--hg-text-muted);
    }
    .text-inv {
        color: var(--hg-text-inv);
    }

    /* --- CUBE CSS: COLORES DE FONDO (HG Colors) --- */
    .bg-brand {
        background-color: var(--hg-brand);
    }
    .bg-brand-soft {
        background-color: var(--hg-brand-soft);
    }
    .bg-accent {
        background-color: var(--hg-accent);
    }
    .bg-accent-soft {
        background-color: var(--hg-accent-soft);
    }
    .bg-canvas {
        background-color: var(--hg-canvas);
    }
    .bg-surface {
        background-color: var(--hg-surface);
    }
    .bg-surface-alt {
        background-color: var(--hg-surface-alt);
    }
    .bg-surface-muted {
        background-color: var(--hg-surface-muted);
    }

    .pad-sec-y {
        max-width: var(--a-container);
        padding-inline: var(--a-sect-pad-x);
        padding-block: var(--a-sect-pad-y);
        margin-inline: auto;
    }

    .z-base {
        z-index: var(--a-z-base, var(--a-raw-layers-base));
    }

    .z-sticky {
        z-index: var(--a-z-sticky);
    }

    .z-overlay {
        z-index: var(--a-z-overlay, var(--a-raw-layers-overlay));
    }

    .z-modal {
        z-index: var(--a-z-modal);
    }

    .z-toast {
        z-index: var(--a-z-toast, var(--a-raw-layers-toast));
    }

    .glass {
        /* Usamos surface-card para asegurar tinte blanco/negro puro */
        background-color: color-mix(in srgb, var(--a-surface-card) 70%, transparent);

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        /* Borde más sutil: mezcla el borde del sistema con transparencia */
        border: 1px solid color-mix(in srgb, var(--a-border) 50%, transparent);

        /* Opcional: Sombra suave para dar profundidad */
        box-shadow: var(--a-shadow-s);
    }

    /* Variante Glass High (más borroso/opaco) */
    .glass-high {
        background-color: color-mix(in srgb, var(--a-surface-card) 85%, transparent);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid color-mix(in srgb, var(--a-border) 60%, transparent);
    }

    /* --- CUBE CSS: FONT WEIGHTS --- */
    .font-normal {
        font-weight: 400;
    }
    .font-medium {
        font-weight: 500;
    }
    .font-semibold {
        font-weight: 600;
    }
    .font-bold {
        font-weight: 700;
    }

    /* --- CUBE CSS: LINE HEIGHTS --- */
    .leading-none {
        line-height: 1;
    }
    .leading-tight {
        line-height: 1.2;
    }
    .leading-snug {
        line-height: 1.35;
    }
    .leading-normal {
        line-height: 1.5;
    }
    .leading-relaxed {
        line-height: 1.625;
    }

    /* --- CUBE CSS: BORDER RADIUS (HG Radius) --- */
    .rounded-xs {
        border-radius: var(--hg-radius-xs);
    }
    .rounded-s {
        border-radius: var(--hg-radius-s);
    }
    .rounded-m {
        border-radius: var(--hg-radius-m);
    }
    .rounded-l {
        border-radius: var(--hg-radius-l);
    }
    .rounded-pill {
        border-radius: var(--hg-radius-pill);
    }
    .rounded-brand {
        border-radius: var(--hg-radius-brand);
    }
    .rounded-none {
        border-radius: var(--hg-radius-none);
    }

    /* --- CUBE CSS: BORDERS --- */
    .border {
        border: 1px solid var(--hg-border);
    }
    .border-2 {
        border: 2px solid var(--hg-border);
    }
    .border-none {
        border: none;
    }
    .border-brand {
        border-color: var(--hg-brand);
    }
    .border-accent {
        border-color: var(--hg-accent);
    }
    .border-transparent {
        border-color: transparent;
    }

    /* --- CUBE CSS: BOX SHADOWS / DEPTHS (HG Depths) --- */
    .shadow-s {
        box-shadow: var(--hg-depth-idle);
    }
    .shadow-m {
        box-shadow: var(--hg-depth-hover);
    }
    .shadow-l {
        box-shadow: var(--hg-depth-overlay);
    }

    /* --- CUBE CSS: TRANSITIONS & MOTION --- */
    .transition-all {
        transition: all var(--hg-duration-fast) var(--hg-motion-snappy);
    }
    .transition-composite {
        transition: var(--hg-motion-composite);
    }
    .duration-fast {
        transition-duration: var(--hg-duration-fast);
    }
    .duration-flow {
        transition-duration: var(--hg-duration-flow);
    }
    .ease-snappy {
        transition-timing-function: var(--hg-motion-snappy);
    }

    /* --- CUBE CSS: TEXT ALIGNMENT --- */
    .text-left {
        text-align: left;
    }
    .text-center {
        text-align: center;
    }
    .text-right {
        text-align: right;
    }
    .text-justify {
        text-align: justify;
    }

    /* --- CUBE CSS: GAPS --- */
    .gap-xs {
        gap: var(--hg-spacing-200);
    }
    .gap-s {
        gap: var(--hg-spacing-300);
    }
    .gap-m {
        gap: var(--hg-spacing-500);
    }
    .gap-l {
        gap: var(--hg-spacing-600);
    }
    .gap-xl {
        gap: var(--hg-spacing-800);
    }
}