/* Efeitos de voo — MORASKI */
html.fx-cursor-active,
html.fx-cursor-active body,
html.fx-cursor-active a,
html.fx-cursor-active button,
html.fx-cursor-active input,
html.fx-cursor-active select,
html.fx-cursor-active textarea,
html.fx-cursor-active [role="button"] {
    cursor: none !important;
}

#flight-fx,
#flight-fx * {
    pointer-events: none !important;
}

#flight-fx {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

/* Camada do cursor (fora do fluxo de clique) */
#flight-fx-cursor {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none !important;
    overflow: visible;
}

/* Cursor minimalista — ponto + anel */
.fx-cursor-dot {
    position: fixed;
    left: 0;
    top: 0;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: var(--ink, #0a0a0a);
    opacity: 0;
    z-index: 10002;
    pointer-events: none !important;
    user-select: none;
    contain: layout style;
    transition: opacity 0.3s ease, transform 0.2s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
    will-change: transform, left, top;
}

.fx-cursor-dot.is-active {
    opacity: 1;
}

.fx-cursor-ring {
    position: fixed;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid rgba(0, 0, 0, 0.28);
    border-radius: 50%;
    opacity: 0;
    z-index: 10001;
    pointer-events: none !important;
    contain: layout style;
    transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, margin 0.25s ease, border-color 0.25s ease;
    will-change: transform, left, top;
}

.fx-cursor-ring.is-active {
    opacity: 1;
}

html.fx-cursor-hover .fx-cursor-ring {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-color: rgba(0, 0, 0, 0.42);
}

html.fx-cursor-hover .fx-cursor-dot {
    transform: scale(1.4);
}

html.fx-cursor-down .fx-cursor-ring {
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border-color: rgba(0, 0, 0, 0.55);
}

.fx-click-ring {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    animation: fx-ring 0.7s ease-out forwards;
}

@keyframes fx-ring {
    0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
}

/* Nuvens suaves — sem blur (pesado na GPU) */
.fx-sky {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.fx-cloud {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.06) 0%, transparent 72%);
    animation: fx-cloud-drift var(--cdur, 40s) ease-in-out infinite alternate;
    animation-delay: var(--cdelay, 0s);
    contain: layout style;
}

@keyframes fx-cloud-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(var(--cmove, 60px), -20px) scale(1.08); }
}

/* Partículas douradas (estrelas de voo) */
.fx-sparkle {
    position: absolute;
    pointer-events: none;
    width: 3px;
    height: 3px;
    background: var(--gold, #1a1a1a);
    border-radius: 50%;
    opacity: 0;
    animation: fx-sparkle var(--sdur, 3s) ease-in-out infinite;
    animation-delay: var(--sdelay, 0s);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

@keyframes fx-sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.55; transform: scale(1); }
}

/* Linha de voo decorativa no hero */
.fx-hero-route {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.fx-hero-route svg {
    position: absolute;
    width: 140%;
    height: 100%;
    left: -20%;
    top: 0;
    opacity: 0.22;
}

.fx-hero-route .route-dash {
    stroke: var(--gold, #1a1a1a);
    stroke-width: 1;
    stroke-dasharray: 8 12;
    fill: none;
    animation: fx-route-dash 20s linear infinite;
}

@keyframes fx-route-dash {
    to { stroke-dashoffset: -200; }
}

@media (max-width: 767px), (pointer: coarse) {
    html.fx-cursor-active,
    html.fx-cursor-active body,
    html.fx-cursor-active a,
    html.fx-cursor-active button {
        cursor: auto !important;
    }

    #flight-fx-cursor {
        display: none !important;
    }
}

/* Pausa animações com aba inativa */
html.fx-paused .fx-ambient-plane,
html.fx-paused .fx-cloud,
html.fx-paused .fx-sparkle,
html.fx-paused .marquee-track,
html.fx-paused .route-dash {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    .fx-cloud,
    .fx-sparkle,
    .fx-hero-route .route-dash {
        animation: none !important;
        opacity: 0 !important;
    }

    #flight-fx-cursor {
        display: none !important;
    }
}
