@keyframes legal-header-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes legal-orb-drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -12px, 0) scale(1.08); }
}

@keyframes legal-title-in {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.legal-header {
    animation: legal-header-float 7s ease-in-out infinite;
}

.legal-hero h1 {
    animation: legal-title-in 1.6s cubic-bezier(.2, .8, .2, 1) both;
}

.legal-orb {
    position: absolute;
    border-radius: 9999px;
    pointer-events: none;
    filter: blur(2px);
    animation: legal-orb-drift 11s ease-in-out infinite;
}

.legal-orb-one {
    width: 180px;
    height: 180px;
    top: 18%;
    right: 12%;
    background: rgba(14, 165, 233, .12);
}

.legal-orb-two {
    width: 120px;
    height: 120px;
    left: 8%;
    bottom: -22px;
    background: rgba(245, 158, 11, .13);
    animation-delay: -3s;
}

.legal-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.legal-card > * {
    position: relative;
    z-index: 1;
}

.legal-icon {
    transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease;
}

.legal-card:hover .legal-icon {
    transform: translateY(-4px) rotate(-5deg) scale(1.08);
    box-shadow: 0 12px 26px rgba(14, 165, 233, .15);
}

.legal-cta {
    transition: transform .4s ease, background-color .4s ease, box-shadow .4s ease;
}

.legal-cta:hover {
    transform: translateY(-4px) scale(1.02);
}

.legal-contact-section[data-aos] {
    transition-duration: 2200ms !important;
}

@media (max-width: 767px) {
    .legal-header {
        animation-duration: 8s;
    }

    .legal-contact-section[data-aos] {
        transition-duration: 2000ms !important;
    }

    .legal-orb-one {
        width: 130px;
        height: 130px;
        right: -30px;
    }

    .legal-orb-two {
        width: 90px;
        height: 90px;
        left: -20px;
    }

    .legal-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-header,
    .legal-hero h1,
    .legal-orb,
    .legal-cta {
        animation: none;
    }

    .legal-icon,
    .legal-cta {
        transition: none;
    }
}
