/* Mobile sticky bottom dock — visible ≤860px */
@media (min-width: 861px) {
    .mobile-dock,
    .mobile-dock-nav,
    .mobile-dock-backdrop { display: none !important; }
}

@media (max-width: 860px) {
    body.has-mobile-dock {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .header .burger { display: none !important; }
    .header .btn-cta-sm { display: none !important; }

    .mobile-dock {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        display: grid;
        grid-template-columns: 1fr 1fr;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(12, 12, 18, 0.94);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    }

    .mobile-dock-half {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-dock-half + .mobile-dock-half {
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-dock-btn {
        width: 100%;
        height: 56px;
        border: none;
        background: transparent;
        color: #f2f2f7;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-dock-btn:hover,
    .mobile-dock-btn.active {
        background: rgba(124, 58, 237, 0.12);
        color: #c084fc;
    }

    .mobile-dock-btn svg {
        width: 24px;
        height: 24px;
        display: block;
    }

    .mobile-dock-btn img {
        width: 24px;
        height: 24px;
        display: block;
        border-radius: 6px;
    }

    /* Contact flyout — icons pop upward */
    .mobile-dock-flyout {
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: 10px;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s, visibility 0.25s;
    }

    .mobile-dock-flyout.open {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
    }

    .mobile-dock-flyout a {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: #1a1a24;
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #f2f2f7;
        text-decoration: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        transform: translateY(16px) scale(0.85);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s, background 0.2s;
    }

    .mobile-dock-flyout.open a {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .mobile-dock-flyout.open a:nth-child(1) { transition-delay: 0.06s; }
    .mobile-dock-flyout.open a:nth-child(2) { transition-delay: 0.12s; }
    .mobile-dock-flyout.open a:nth-child(3) { transition-delay: 0.18s; }

    .mobile-dock-flyout a:hover,
    .mobile-dock-flyout a:active {
        background: #252532;
        border-color: rgba(192, 132, 252, 0.35);
    }

    .mobile-dock-flyout svg {
        width: 22px;
        height: 22px;
    }

    .mobile-dock-flyout img {
        width: 22px;
        height: 22px;
        border-radius: 4px;
    }

    /* Full-screen menu from burger */
    .mobile-dock-nav {
        position: fixed;
        inset: 0;
        z-index: 1090;
        background: rgba(8, 8, 12, 0.97);
        backdrop-filter: blur(24px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 24px calc(80px + env(safe-area-inset-bottom, 0px));
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .mobile-dock-nav.open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-dock-nav-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 16px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mobile-dock-nav-logo {
        font-weight: 800;
        font-size: 0.95rem;
        color: #f2f2f7;
        text-decoration: none;
    }

    .mobile-dock-nav-close {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: #1a1a24;
        color: #9b9bb0;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-dock-nav-list {
        list-style: none;
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .mobile-dock-nav-list li {
        margin-bottom: 4px;
    }

    .mobile-dock-nav-list a,
    .mobile-dock-nav-list button {
        display: block;
        width: 100%;
        padding: 16px 20px;
        color: #f2f2f7;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        border: none;
        background: transparent;
        font-family: inherit;
        cursor: pointer;
        border-radius: 12px;
        transition: background 0.2s, color 0.2s;
    }

    .mobile-dock-nav-list a:hover,
    .mobile-dock-nav-list button:hover {
        background: rgba(124, 58, 237, 0.15);
        color: #c084fc;
    }

    .mobile-dock-nav-list .dock-nav-cta {
        margin-top: 12px;
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
        color: #fff !important;
        border-radius: 50px;
    }

    .mobile-dock-nav-list .dock-nav-cta:hover {
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
        opacity: 0.92;
    }

    .mobile-dock-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1085;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s, visibility 0.25s;
    }

    .mobile-dock-backdrop.open {
        opacity: 1;
        visibility: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-dock-flyout a {
        transition: none !important;
    }
}
