/* =============================================================================
 * Avalonia Hero Effects v1.0 — WOW particle background + shimmer + reveal
 * =============================================================================
 * Samostatný súbor, nezávislý od style.css. Loaduje sa po hlavnom CSS.
 * Rešpektuje prefers-reduced-motion a prefers-reduced-data.
 * ========================================================================== */

/* -------------------------- Canvas container ------------------------------ */
.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.hero-particles.ready {
    opacity: 1;
}

/* Particles musia byť pod hero-content ale nad hero-bg::before */
#hero .hero-bg {
    z-index: 0;
}

#hero .hero-content {
    position: relative;
    z-index: 2;
}

/* -------------------------- Shimmer na gradient text ---------------------- */
@keyframes avaShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.hero-title .gradient-text {
    background: linear-gradient(
        90deg,
        var(--secondary-color) 0%,
        var(--tertiary-color) 25%,
        #ffffff 50%,
        var(--tertiary-color) 75%,
        var(--secondary-color) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: avaShimmer 6s linear infinite;
}

/* -------------------------- Glow pulse na stat-box ------------------------ */
.stat-box {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow:
        0 10px 40px rgba(var(--secondary-color-rgb, 124, 58, 237), 0.35),
        0 0 20px rgba(var(--tertiary-color-rgb, 168, 85, 247), 0.2);
}

.stat-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(var(--secondary-color-rgb, 124, 58, 237), 0),
        rgba(var(--tertiary-color-rgb, 168, 85, 247), 0.6),
        rgba(var(--secondary-color-rgb, 124, 58, 237), 0));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-box:hover::before {
    opacity: 1;
}

/* -------------------------- Hero button ripple ---------------------------- */
.btn-main {
    position: relative;
    overflow: hidden;
}

.btn-main::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    pointer-events: none;
    opacity: 1;
}

.btn-main:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: width 0s, height 0s, opacity 0.4s ease;
}

/* -------------------------- Scroll reveal --------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > *.revealed {
    animation: revealFadeUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes revealFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -------------------------- Accessibility --------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hero-particles { display: none !important; }
    .hero-title .gradient-text { animation: none !important; }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .stat-box:hover { transform: none !important; }
}

/* -------------------------- Mobile optimization --------------------------- */
@media (max-width: 768px) {
    .hero-particles { display: none; }
    .hero-title .gradient-text { animation-duration: 8s; }
}

@media (prefers-reduced-data: reduce) {
    .hero-particles { display: none; }
}
