/* ==========================================================================
   SoftDryzz — Shared Visual Effects
   Archivo: effects.css
   Estilos compartidos: loader, custom cursor, scroll reveal, hero canvas
   Prefijo fx- para evitar conflictos con estilos de cada pagina
   ========================================================================== */

/* ═══════════════════════════════════════
   1. LOADER
   ═══════════════════════════════════════ */
.fx-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08080c;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.fx-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.fx-loader__logo {
    font-family: inherit;
    font-size: 1.8rem;
    font-weight: 800;
    color: #f0f0f5;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.fx-loader__logo span {
    background: linear-gradient(135deg, #e8a838 0%, #f06595 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fx-loader__bar {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.fx-loader__progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e8a838, #f06595, #38bdf8);
    border-radius: 3px;
    transition: width 0.15s ease-out;
}

/* ═══════════════════════════════════════
   2. CUSTOM CURSOR
   ═══════════════════════════════════════ */
.fx-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
}

.fx-cursor__dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
}

.fx-cursor__ring {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

/* Hover state */
.fx-cursor.fx-cursor--hover .fx-cursor__dot {
    width: 4px;
    height: 4px;
}

.fx-cursor.fx-cursor--hover .fx-cursor__ring {
    width: 56px;
    height: 56px;
    border-color: rgba(255, 255, 255, 0.8);
}

/* Hide system cursor when custom cursor is active */
body.fx-cursor-active,
body.fx-cursor-active a,
body.fx-cursor-active button,
body.fx-cursor-active input,
body.fx-cursor-active textarea,
body.fx-cursor-active select {
    cursor: none !important;
}

/* ═══════════════════════════════════════
   3. SCROLL REVEAL (data-reveal)
   ═══════════════════════════════════════ */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   4. HERO CANVAS
   ═══════════════════════════════════════ */
.fx-hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Ensure hero content sits above the canvas */
.fx-hero-canvas ~ .container {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════
   5. RESPONSIVE & ACCESSIBILITY
   ═══════════════════════════════════════ */

/* Disable cursor on mobile / touch devices */
@media (max-width: 768px), (hover: none) {
    body.fx-cursor-active,
    body.fx-cursor-active a,
    body.fx-cursor-active button,
    body.fx-cursor-active input,
    body.fx-cursor-active textarea,
    body.fx-cursor-active select {
        cursor: auto !important;
    }

    .fx-cursor {
        display: none !important;
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .fx-loader {
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .fx-hero-canvas {
        display: none;
    }

    .fx-cursor {
        display: none !important;
    }

    body.fx-cursor-active,
    body.fx-cursor-active a,
    body.fx-cursor-active button {
        cursor: auto !important;
    }
}
