/**
 * Shared Utility Styles
 * Prefix: .util-*
 */

/* Text scramble effect */
.scramble-char {
    color: var(--color-accent);
    opacity: 0.8;
}

/* Fade in animation */
.util-fade-in {
    animation: util-fade-in 0.5s ease forwards;
}

@keyframes util-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children animation */
.util-stagger > * {
    opacity: 0;
    animation: util-fade-in 0.4s ease forwards;
}

.util-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.util-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.util-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.util-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.util-stagger > *:nth-child(5) { animation-delay: 0.5s; }

/* Loading state */
.util-loading {
    position: relative;
    pointer-events: none;
}

.util-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen reader only */
.util-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible */
.util-focus-visible:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
