/* ─────────────────────────────────────────────────────────────
   ORBIT  v4
   Flyers usam position:fixed — saem da tela quando y > vh,
   sem depender de overflow:hidden.
   ───────────────────────────────────────────────────────────── */

/* Fix: overflow-x:hidden no body quebra position:sticky do GSAP pin */
html.orbit-on,
html.orbit-on body {
    overflow-x: clip !important;
}

/* ── Track: container que gera o scroll ── */
.orbit-track {
    position: relative;
    width: 100%;
}

/* ── Stage: o que o GSAP vai pinar (contém o hero) ── */
.orbit-stage {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* SEM overflow:hidden — os flyers são fixed, não precisam ser clipados aqui */
}

.orbit-stage .hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    z-index: 2;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ── Flock: container dos flyers (position:fixed, no body) ── */
.orbit-flock {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;        /* acima de tudo */
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbit-flock.revealed {
    opacity: 1;
}

/* ── Flyer individual ── */
.orbit-flyer {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-secondary, #111);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    cursor: pointer;
    will-change: transform, opacity;
    transform-origin: center center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.orbit-flyer:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.5);
}

.orbit-flyer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* ── Grid de cases: z-index normal ── */
.cases-grid {
    position: relative;
    z-index: 5;
}

/* ── Tema claro ── */
@media (prefers-color-scheme: light) {
    .orbit-flyer {
        background: var(--bg-secondary, #f0ede6);
        border-color: rgba(0, 0, 0, 0.12);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    }
    .orbit-flyer:hover {
        border-color: rgba(0, 0, 0, 0.5);
        box-shadow: 0 20px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.4);
    }
}

[data-theme="light"] .orbit-flyer {
    background: var(--bg-secondary, #f0ede6);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .orbit-flyer:hover {
    border-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.4);
}
