/* ============================================
   OmniEdit X Studio — Premium Scroll Animations
   Inspired by 1111-style scroll-driven effects
   ============================================ */

/* Inter font now managed efficiently in main.css / html head */

/* ── Smooth Scroll ── */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    /* Absolute Nuclear Lockout for ALL lingering particle elements on mobile devices */
    .live-bg, .orb, .firefly-pop, .particles-container, .particle {
        display: none !important;
        animation: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    *,
    html,
    body {
        cursor: auto !important;
    }

    a,
    button,
    input[type="submit"],
    input[type="button"],
    select,
    label,
    [role="button"],
    .nav-profile-dropdown,
    .hamburger,
    .faq-q,
    .btn-submit,
    .btn-edit,
    .btn-share {
        cursor: pointer !important;
    }
}

/* ── Live Animated Background Mesh ── */
.live-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.live-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.12;
    will-change: transform;
}

.live-bg .orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    top: -10%;
    left: -10%;
    animation: orbFloat1 40s ease-in-out infinite;
}

.live-bg .orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7b61ff, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: orbFloat2 45s ease-in-out infinite;
}

.live-bg .orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    top: 40%;
    left: 50%;
    animation: orbFloat3 35s ease-in-out infinite;
}

.live-bg .orb-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #7b61ff, transparent 70%);
    top: 20%;
    left: 80%;
    animation: orbFloat1 50s ease-in-out infinite reverse;
}

.live-bg .orb-5 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    bottom: 20%;
    left: 20%;
    animation: orbFloat2 60s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(15vw, 10vh) scale(1.15);
    }

    66% {
        transform: translate(5vw, 25vh) scale(0.9);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-12vw, -15vh) scale(1.1);
    }

    66% {
        transform: translate(-20vw, -5vh) scale(0.95);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0.08;
    }

    50% {
        transform: translate(-20vw, -15vh) scale(1.2);
        opacity: 0.16;
    }
}

@media (max-width: 1024px) {
    .live-bg .orb {
        animation: none !important;
        filter: blur(60px) !important;
    }
}

.click-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: var(--accent, #00d4ff);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    animation: particleAnim 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes particleAnim {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.5);
        opacity: 0;
    }
}


/* ── Scroll Progress Bar ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #7b61ff, var(--accent));
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
    transition: none;
    box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ── Floating Particles (optimized — 15 max, GPU composite) ── */
.particles-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    contain: strict;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 10s ease-in-out infinite;
    contain: strict;
}

.firefly-pop {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0; /* Behind text content, but present in DOM stack */
    animation: fireflyFade 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: transform, opacity;
}

@keyframes fireflyFade {
    0% { transform: translate(0, 0) scale(0); opacity: 0; filter: blur(2px); }
    50% { opacity: 0.95; transform: translate(var(--dx), var(--dy)) scale(1); filter: blur(0.5px); }
    100% { transform: translate(calc(var(--dx) * 2), calc(var(--dy) * 2)) scale(0.1); opacity: 0; filter: blur(3px); }
}


@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    20% {
        opacity: 0.4;
    }

    80% {
        opacity: 0.15;
    }

    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* ── Scroll Reveal System ── */
.reveal {
    opacity: 0;
    transform: translateY(80px) translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Reveal from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-100px) translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0) translateZ(0);
}

/* Reveal from right */
.reveal-right {
    opacity: 0;
    transform: translateX(100px) translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0) translateZ(0);
}

/* Scale reveal */
.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Rotate reveal */
.reveal-rotate {
    opacity: 0;
    transform: translateY(60px) rotate(5deg);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-rotate.visible {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Blur reveal */
.reveal-blur {
    opacity: 0;
    filter: blur(20px);
    transform: translateY(40px);
    transition: opacity 1s ease,
        filter 1s ease,
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, filter, transform;
}

.reveal-blur.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger children */
.stagger-children>* {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0.05s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.12s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.19s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.26s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.33s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.40s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(7) {
    transition-delay: 0.47s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(8) {
    transition-delay: 0.54s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(9) {
    transition-delay: 0.61s;
    opacity: 1;
    transform: translateY(0);
}

/* ── Parallax Elements ── */
.parallax-slow {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ── Glowing Section Divider ── */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 0 auto;
    opacity: 0.4;
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    filter: blur(4px);
}

/* ── Premium Button Hover Animations ── */
.magnetic-btn {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease, background 0.4s ease !important;
    position: relative;
    overflow: hidden;
}

.magnetic-btn:hover {
    transform: scale(1.04) !important;
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(123, 97, 255, 0.2) !important;
    filter: brightness(1.12) !important;
}

.magnetic-btn:active {
    transform: scale(0.97) !important;
}

/* ── 3D Tilt Card ── */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

/* ── Text Gradient Animation ── */
.animated-gradient-text {
    background: linear-gradient(270deg, #ffffff, var(--accent), #7b61ff, var(--accent), #ffffff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Counter Animation ── */
.count-up {
    font-variant-numeric: tabular-nums;
}

/* ── Glow Pulse on cards ── */
.glow-on-scroll {
    transition: box-shadow 0.6s ease;
}

.glow-on-scroll.visible {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ── Nav unified ── */
.nav-unified {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 18px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.4s ease,
        box-shadow 0.4s ease;
}

.nav-unified.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-unified.nav-hidden {
    transform: translateY(-100%);
}

/* ── Hamburger Menu ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 10001;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-unified {
        padding: 14px 20px !important;
    }

    .hamburger {
        display: flex;
    }

    .nav-links-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(30px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10000;
        border-left: 1px solid rgba(0, 212, 255, 0.1);
    }

    .nav-links-wrapper.open {
        right: 0;
    }

    .nav-links-wrapper a {
        margin-left: 0 !important;
        font-size: 22px !important;
    }
}

/* ── Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate,
    .reveal-blur {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .particle {
        animation: none !important;
    }
}

/* ── Nav User Widget ── */
.nav-user-widget {
    margin-left: 30px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10001;
}

/* ── Online Counter Widget ── */
.nav-online-counter {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 50px;
    background: rgba(46, 213, 115, 0.08);
    border: 1px solid rgba(46, 213, 115, 0.2);
    margin-right: 14px;
    transition: all 0.4s ease;
    cursor: default;
    white-space: nowrap;
}

.nav-online-counter:hover {
    background: rgba(46, 213, 115, 0.14);
    border-color: rgba(46, 213, 115, 0.4);
}

.nav-online-counter .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ed573;
    flex-shrink: 0;
    animation: presencePulse 2s ease-in-out infinite;
}

.nav-online-counter .counter-label {
    font-size: 12px;
    font-weight: 700;
    color: #2ed573;
    letter-spacing: 0.5px;
}

.nav-online-counter .counter-num {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    min-width: 14px;
    text-align: center;
}

.nav-login-btn {
    padding: 8px 24px !important;
    background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
    color: #fff !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.3s ease !important;
    margin-left: 0 !important;
    border: none;
}

.nav-login-btn::after {
    display: none !important;
}

.nav-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.nav-profile-dropdown {
    position: relative;
    cursor: pointer;
}

.nav-avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card);
    padding: 3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: none;
    overflow: hidden;
}

.nav-avatar-btn::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: conic-gradient(from 0deg, transparent 0%, var(--accent) 30%, var(--accent2) 70%, transparent 100%);
    animation: profileSpin 3s linear infinite;
    z-index: 0;
}

@keyframes profileSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.nav-avatar-btn:hover {
    transform: scale(1.08);
}

.nav-avatar-btn:hover::before {
    animation-duration: 1.5s;
    filter: brightness(1.5);
}

.nav-avatar-btn img,
.nav-avatar-btn video {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    background: var(--bg);
}

.nav-avatar-btn .initial {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Online Presence Dot ── */
.nav-avatar-btn {
    position: relative;
    /* ensure dot is positioned within */
}

.presence-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--bg, #0a0a0f);
    z-index: 10;
    pointer-events: none;
}

.presence-dot.online {
    background: #2ed573;
    box-shadow: 0 0 6px rgba(46, 213, 115, 0.8), 0 0 12px rgba(46, 213, 115, 0.4);
    animation: presencePulse 2s ease-in-out infinite;
}

@keyframes presencePulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(46, 213, 115, 0.8), 0 0 12px rgba(46, 213, 115, 0.4);
    }

    50% {
        box-shadow: 0 0 10px rgba(46, 213, 115, 1), 0 0 22px rgba(46, 213, 115, 0.6);
    }
}

.dropdown-menu {
    position: absolute;
    top: 130%;
    right: -20px;
    width: 280px;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.nav-profile-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
}

.dropdown-header .avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.dropdown-header .avatar-large img,
.dropdown-header .avatar-large video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-header .avatar-large .initial {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.dropdown-header .user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-header .user-info .name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-header .user-info .biz {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-header .user-info .id {
    font-size: 10px;
    color: var(--secondary);
    margin-top: 2px;
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    color: var(--secondary) !important;
    text-decoration: none;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    margin-left: 0 !important;
}

.dropdown-menu a::after {
    display: none !important;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent) !important;
}

.dropdown-menu button.logout-btn {
    margin-top: 5px;
    color: #ff4757 !important;
}

.dropdown-menu button.logout-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757 !important;
}

@media (max-width: 768px) {
    .nav-user-widget {
        margin-left: 0;
        margin-top: 20px;
        justify-content: center;
        width: 100%;
    }

    .dropdown-menu {
        right: 50%;
        transform: translateX(50%) translateY(10px);
    }

    .nav-profile-dropdown:hover .dropdown-menu {
        transform: translateX(50%) translateY(0);
    }
}

/* ── Disable ALL Animations on Mobile for Performance ── */
@media (max-width: 768px) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    /* Force reveal elements to be fully visible immediately */
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate,
    .reveal-blur,
    .stagger-children>*,
    .welcome-intro,
    .hero-title,
    .hero-sub,
    .hero-desc,
    .cta-group,
    .scroll-indicator,
    .gallery-title,
    .animated-gradient-text,
    .fadeUp,
    .reveal-fade {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        visibility: visible !important;
    }

    /* Hide heavy background effects completely on mobile */
    .live-bg,
    .particles-container {
        display: none !important;
    }
}