/* Services hero 3D orbit (main/static/js/services-orbit/) */
.services-orbit {
    position: relative;
    width: 100%;
    height: 280px;
}

@media (min-width: 480px) {
    .services-orbit {
        height: 360px;
    }
}

@media (min-width: 768px) {
    .services-orbit {
        height: 600px;
    }
}

.services-orbit__canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    /* Fade the side and bottom edges so nothing in the scene ends in a hard line. */
    -webkit-mask-image:
        linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
        linear-gradient(to bottom, #000 92%, transparent);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
        linear-gradient(to bottom, #000 92%, transparent);
    mask-composite: intersect;
    /* Horizontal drags spin the orbit; vertical swipes still scroll the page. */
    touch-action: pan-y;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.services-orbit.is-ready .services-orbit__canvas {
    opacity: 1;
}

.services-orbit__canvas.is-dragging {
    cursor: grabbing;
}

/* The labels belong to the scene, so they show only once it does and fade in with it. */
.services-orbit__labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.services-orbit.is-ready .services-orbit__labels {
    opacity: 1;
}

.orbit-label {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(20, 32, 74, 0.45);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    will-change: transform, opacity;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.orbit-label__num {
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
}

/* Only the active practice shows its name; the others stay compact number chips. */
.orbit-label__name {
    display: inline-block;
    max-width: 0;
    margin-left: -0.4rem;
    overflow: hidden;
    transition: max-width 0.35s ease, margin-left 0.35s ease;
}

.orbit-label.is-active {
    border-color: var(--kd-mint-bright);
    background: var(--kd-mint-bright);
    color: #0B1B3A;
    font-size: 0.8rem;
}

.orbit-label.is-active .orbit-label__num {
    opacity: 0.6;
}

.orbit-label.is-active .orbit-label__name {
    max-width: 14rem;
    margin-left: 0;
}

.orbit-label:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* The wordmark above the emblem, matching the home hero's brand pin. */
.orbit-brand {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    display: inline-flex;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #233A6E;
    box-shadow: 0 6px 16px -6px rgba(15, 27, 77, 0.6);
    pointer-events: none;
    will-change: transform, opacity;
}

.orbit-brand img {
    display: block;
    width: auto;
    height: 0.9rem;
}

/* A still of the orbit, for browsers that can't run the 3D scene. It stays invisible
   for a moment so a working scene can take over first; if the scene never starts
   (no WebGL, or the script fails to load) it fades in. If the scene starts late, the still
   fades out as the scene fades in. The fade out uses filter, as opacity belongs to the
   fade-in animation. */
.services-orbit__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    animation: services-orbit-fallback 0.6s ease 3s forwards;
    transition: filter 0.6s ease, visibility 0s 0.6s;
}

.services-orbit.is-unsupported .services-orbit__fallback {
    animation-delay: 0s;
}

.services-orbit.is-ready .services-orbit__fallback {
    filter: opacity(0);
    visibility: hidden;
}

@keyframes services-orbit-fallback {
    to {
        opacity: 1;
    }
}

.services-orbit.is-unsupported .services-orbit__labels {
    display: none;
}

/* Orbit labels scroll to these cards; leave room for the fixed navigation. */
[data-practice] {
    scroll-margin-top: 7rem;
}

@media (max-width: 767px) {
    .orbit-label {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}
