/* Web7 Pro Motion — theme-aware global motion for desktop + mobile. */
:root {
    --pro-accent: 109, 54, 242;
    --pro-accent-2: 49, 104, 255;
    --pro-accent-3: 168, 77, 255;
    --pro-glow: rgba(109, 54, 242, .18);
    --pro-line: rgba(109, 54, 242, .16);
    --pro-shadow: rgba(55, 30, 99, .14);
    --pro-scroll-shift: 0px;
}

html.dark {
    --pro-accent: 176, 139, 255;
    --pro-accent-2: 88, 121, 255;
    --pro-accent-3: 196, 122, 255;
    --pro-glow: rgba(140, 91, 255, .24);
    --pro-line: rgba(188, 157, 255, .18);
    --pro-shadow: rgba(0, 0, 0, .34);
}

body.web7-pro-motion {
    position: relative;
    overflow-x: clip;
}

.pro-motion-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.pro-motion-orb {
    position: absolute;
    width: min(34vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: .28;
    filter: blur(72px);
    will-change: transform;
    transition: opacity .5s ease, background .5s ease;
}

.pro-motion-orb-a {
    left: -10vw;
    top: 14vh;
    background: rgba(var(--pro-accent-2), .18);
    transform: translate3d(var(--pro-ambient-x, 0px), calc(var(--pro-scroll-shift) * .28), 0);
}

.pro-motion-orb-b {
    right: -12vw;
    top: 46vh;
    background: rgba(var(--pro-accent-3), .16);
    transform: translate3d(calc(var(--pro-ambient-x, 0px) * -.7), calc(var(--pro-scroll-shift) * -.18), 0);
}

.dark .pro-motion-orb {
    opacity: .4;
}

body.web7-pro-motion > main,
body.web7-pro-motion > footer {
    position: relative;
    z-index: 1;
}

.pro-scroll-progress {
    position: fixed;
    z-index: 160;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    background: linear-gradient(90deg,
        rgb(var(--pro-accent-2)),
        rgb(var(--pro-accent)),
        rgb(var(--pro-accent-3)));
    box-shadow: 0 0 16px rgba(var(--pro-accent), .45);
    transition: opacity .2s ease;
    will-change: transform;
}

.pro-scroll-progress.is-visible {
    opacity: 1;
}

.pro-cursor-glow {
    position: fixed;
    z-index: 140;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    margin: -110px 0 0 -110px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle,
        rgba(var(--pro-accent), .115) 0%,
        rgba(var(--pro-accent-2), .045) 34%,
        transparent 68%);
    filter: blur(2px);
    mix-blend-mode: multiply;
    transform: translate3d(-999px, -999px, 0) scale(.86);
    transition: opacity .24s ease, width .2s ease, height .2s ease, margin .2s ease;
    will-change: transform;
}

.dark .pro-cursor-glow {
    mix-blend-mode: screen;
    background: radial-gradient(circle,
        rgba(var(--pro-accent), .14) 0%,
        rgba(var(--pro-accent-2), .05) 35%,
        transparent 68%);
}

.pro-cursor-glow.is-visible {
    opacity: 1;
}

.pro-cursor-glow.is-interactive {
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
}

.pro-theme-flash {
    position: fixed;
    z-index: 220;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--pro-flash-x, 90%) var(--pro-flash-y, 6%),
        rgba(var(--pro-accent), .22) 0%,
        rgba(var(--pro-accent-2), .09) 16%,
        transparent 44%);
}

.pro-theme-flash.is-active {
    animation: proThemeFlash .68s cubic-bezier(.2, .8, .2, 1) both;
}

.pro-tap-bloom {
    position: fixed;
    z-index: 210;
    top: var(--pro-tap-y, 50%);
    left: var(--pro-tap-x, 50%);
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 1px solid rgba(var(--pro-accent), .34);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(var(--pro-accent), .16), 0 0 30px rgba(var(--pro-accent), .18);
}

.pro-tap-bloom.is-active {
    animation: proTapBloom .46s cubic-bezier(.18, .8, .25, 1) both;
}

/* Section reveals are enabled only after JS marks the page ready, preventing no-JS hiding. */
.web7-pro-motion.motion-ready .pro-reveal {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(var(--pro-reveal-x, 0px), var(--pro-reveal-y, 26px), 0) scale(.994);
    transition:
        opacity .72s cubic-bezier(.2, .75, .2, 1),
        transform .82s cubic-bezier(.18, .78, .18, 1),
        filter .62s ease;
    transition-delay: var(--pro-reveal-delay, 0ms);
    will-change: transform, opacity;
}

.web7-pro-motion.motion-ready .pro-reveal.is-pro-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
    will-change: auto;
}

/* JS applies this only to suitable surfaces that have no existing transform system. */
.pro-motion-card {
    --pro-tilt-x: 0deg;
    --pro-tilt-y: 0deg;
    --pro-card-lift: 0px;
    transform: perspective(1100px) rotateX(var(--pro-tilt-x)) rotateY(var(--pro-tilt-y)) translate3d(0, var(--pro-card-lift), 0);
    transform-style: preserve-3d;
    transition: transform .34s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
    will-change: transform;
}

.pro-motion-card.is-pro-hovered {
    --pro-card-lift: -3px;
    box-shadow: 0 22px 52px var(--pro-shadow);
}

/* Keep themed interactive states feeling tactile without fighting page-specific hover transforms. */
.pro-motion-interactive {
    position: relative;
    isolation: isolate;
}

.pro-motion-interactive::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--pro-hit-x, 50%) var(--pro-hit-y, 50%),
        rgba(var(--pro-accent), .15),
        transparent 56%);
    transition: opacity .24s ease;
}

.pro-motion-interactive:hover::before,
.pro-motion-interactive:focus-visible::before {
    opacity: 1;
}

/* Theme switch gets an intentional energy pulse matching the site palette. */
.theme-switch-track.pro-theme-trigger {
    overflow: visible !important;
}

.theme-switch-track.pro-theme-trigger::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border: 1px solid rgba(var(--pro-accent), .22);
    border-radius: 999px;
    opacity: 0;
    transform: scale(.84);
}

.theme-switch-track.pro-theme-trigger.is-theme-pulsing::after {
    animation: proThemeRing .54s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes proThemeFlash {
    0% { opacity: 0; transform: scale(.98); }
    22% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.025); }
}

@keyframes proTapBloom {
    0% { opacity: .9; transform: scale(.45); box-shadow: 0 0 0 0 rgba(var(--pro-accent), .18); }
    100% { opacity: 0; transform: scale(4.2); box-shadow: 0 0 0 12px rgba(var(--pro-accent), 0); }
}

@keyframes proThemeRing {
    0% { opacity: .65; transform: scale(.82); }
    100% { opacity: 0; transform: scale(1.34); }
}

@media (max-width: 1023px) {
    .pro-motion-orb {
        width: 78vw;
        opacity: .22;
        filter: blur(66px);
    }

    .dark .pro-motion-orb {
        opacity: .3;
    }

    .pro-motion-orb-a {
        left: -38vw;
        top: 10vh;
    }

    .pro-motion-orb-b {
        right: -42vw;
        top: 58vh;
    }

    .pro-cursor-glow {
        display: none !important;
    }

    .pro-scroll-progress {
        height: 2px;
        top: env(safe-area-inset-top);
    }

    .web7-pro-motion.motion-ready .pro-reveal {
        --pro-reveal-y: 18px;
        filter: blur(3px);
        transition-duration: .62s, .7s, .54s;
    }

    .pro-motion-card {
        transform: none !important;
        transition: box-shadow .24s ease !important;
    }
}

@media (hover: none), (pointer: coarse) {
    .pro-motion-interactive::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pro-motion-ambient,
    .pro-scroll-progress,
    .pro-cursor-glow,
    .pro-theme-flash,
    .pro-tap-bloom {
        display: none !important;
    }

    .web7-pro-motion.motion-ready .pro-reveal,
    .web7-pro-motion.motion-ready .pro-reveal.is-pro-visible,
    .pro-motion-card,
    .pro-motion-interactive,
    .theme-switch-track.pro-theme-trigger::after {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}
