/* ============================================================
   CONSULTORA FX — Page Transition + Custom Cursor
   ============================================================ */

/* ── PAGE LOADER / TRANSITION OVERLAY ─────────────────────── */

/*
   ENTRY: starts fully covering the screen (circle at 150%),
   then shrinks to nothing once the page has loaded.
*/
#consultora-loader {
    position: fixed;
    inset: 0;
    background: #006367;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    clip-path: circle(150% at 50% 50%);
    transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1);
}

#consultora-loader.loaded {
    clip-path: circle(0% at 50% 50%);
}

/* Completely remove from flow after transition */
#consultora-loader.done {
    display: none;
}

/* Spinner shown while circle is still covering the screen */
.consultora-spinner {
    width: 52px;
    height: 52px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: consultora-spin 0.75s linear infinite;
}

@keyframes consultora-spin {
    to { transform: rotate(360deg); }
}

/*
   EXIT: 5 vertical strips wipe down in a stagger, covering the page
   before the browser navigates away.
*/
#consultora-curtain {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
    display: flex;
}

/* Each strip slides in from the top */
.consultora-strip {
    flex: 1;
    height: 100%;
    background: #006367;
    transform: translateY(-100%);
    transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Staggered delays so they cascade left → right */
.consultora-strip:nth-child(1) { transition-delay: 0ms;   }
.consultora-strip:nth-child(2) { transition-delay: 65ms;  }
.consultora-strip:nth-child(3) { transition-delay: 130ms; }
.consultora-strip:nth-child(4) { transition-delay: 195ms; }
.consultora-strip:nth-child(5) { transition-delay: 260ms; }

#consultora-curtain.active {
    pointer-events: auto;
}

#consultora-curtain.active .consultora-strip {
    transform: translateY(0);
}

/* ── CUSTOM CURSOR ─────────────────────────────────────────── */

/* Hide the native cursor site-wide */
*, *::before, *::after {
    cursor: none !important;
}

/* Dot — sharp, snappy, sits exactly on the pointer */
#cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px;
    height: 8px;
    background: #006367;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.15);
    transition: transform 0.08s linear,
                background 0.2s,
                width 0.2s,
                height 0.2s;
    will-change: transform;
}

/* Ring — larger circle, lags behind to create the trailing effect */
#cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 34px;
    height: 34px;
    border: 2px solid #006367;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.2));
    transition: width 0.25s ease,
                height 0.25s ease,
                border-color 0.2s,
                background 0.2s,
                opacity 0.2s;
    will-change: transform;
    opacity: 0.85;
}

/* Hover state: dot shrinks + ring expands + fills slightly */
body.cursor-hover #cursor-dot {
    width: 5px;
    height: 5px;
    background: #006367;
}

body.cursor-hover #cursor-ring {
    width: 48px;
    height: 48px;
    border-color: #006367;
    opacity: 0.55;
}

/* Inverted state: cursor is over a #006367 background — switch to white */
#cursor-dot.cursor-inverted {
    background: #ffffff !important;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}

#cursor-ring.cursor-inverted {
    border-color: #ffffff !important;
}

body.cursor-hover #cursor-dot.cursor-inverted {
    background: #ffffff !important;
}

body.cursor-hover #cursor-ring.cursor-inverted {
    border-color: #ffffff !important;
}

/* Click state: both elements squish */
body.cursor-click #cursor-dot {
    transform: translate(-50%, -50%) scale(0.65);
}

body.cursor-click #cursor-ring {
    transform: translate(-50%, -50%) scale(0.75);
    opacity: 0.9;
}

/* Hide cursor on touch devices AND all screens up to tablet width (≤1024px) */
@media (hover: none) and (pointer: coarse),
       (max-width: 1024px) {
    #cursor-dot,
    #cursor-ring {
        display: none !important;
    }
    *, *::before, *::after {
        cursor: auto !important;
    }
}
