/* =========================================================
   LINEA STUDIO — ANIMATIONS v2
   Premium micro-interactions
   ========================================================= */

/* --- Scroll Indicator Pulse --- */
@keyframes scrollPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.scroll-indicator {
    animation: scrollPulse 2.5s infinite;
}

/* --- Text Character Stagger --- */
.char-stagger .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.char-stagger.visible .char {
    opacity: 1;
    transform: translateY(0);
}

/* --- Horizontal line grow --- */
.line-grow {
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.8s var(--ease-out);
}

.line-grow.visible {
    width: 48px;
}

/* --- Scale Reveal --- */
.scale-reveal {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.scale-reveal.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Counter shimmer --- */
.counter-animate {
    position: relative;
    overflow: hidden;
}

.counter-animate::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230,51,41,0.1), transparent);
    animation: counterShimmer 2s 1s ease-out forwards;
}

@keyframes counterShimmer {
    from { left: -100%; }
    to { left: 100%; }
}

/* --- Cursor crosshair on hover links --- */
.project-row,
.project-card,
.service-cell {
    cursor: crosshair;
}

.btn {
    cursor: pointer;
}

/* --- Smooth scrollbar (webkit) --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
}

::-webkit-scrollbar-thumb:hover {
    background: #c42a22;
}

/* --- Focus States (Accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- Link transitions --- */
a,
button {
    transition: color 0.3s var(--ease-out),
                background-color 0.3s var(--ease-out),
                border-color 0.3s var(--ease-out);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .page-loader {
        display: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .scale-reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
    }

    .img-reveal::after {
        display: none !important;
    }

    .char-stagger .char {
        opacity: 1 !important;
        transform: none !important;
    }

    .line-grow {
        width: 48px !important;
    }

    .marquee__inner {
        animation: none !important;
    }
}
