/**
 * Shared business line / ring group bento animation.
 * Scoped to body.pl-landing-time only.
 */
/* Phone & team — one shared line */
body.pl-landing-time .pl-time-voice-stage {
    margin-top: auto;
    flex: 0 0 auto;
    height: 276px;
    min-height: 276px;
    max-height: 276px;
    padding: 12px 10px 0;
    display: flex;
    align-items: stretch;
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

body.pl-landing-time .pl-voice-anim {
    --voice-cycle: 8.5s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.pl-landing-time .pl-voice-anim__call {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 12px 12px;
    border-radius: 14px;
    background: #111;
    color: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: plVoiceCallFrame var(--voice-cycle) cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

body.pl-landing-time .pl-voice-anim__rings {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 44px;
    height: 44px;
    translate: 0 -50%;
    pointer-events: none;
}

body.pl-landing-time .pl-voice-anim__rings i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    opacity: 0;
    animation: plVoiceRing var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__rings i:nth-child(2) { animation-delay: 0.28s; }
body.pl-landing-time .pl-voice-anim__rings i:nth-child(3) { animation-delay: 0.56s; }

body.pl-landing-time .pl-voice-anim__call-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

body.pl-landing-time .pl-voice-anim__avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #111;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.03em;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28);
    animation: plVoiceAvatarPulse var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__call-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

body.pl-landing-time .pl-voice-anim__banner {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    animation: plVoiceBannerPulse 1.1s ease-in-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__name {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.pl-landing-time .pl-voice-anim__line {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.58);
    letter-spacing: -0.01em;
}

body.pl-landing-time .pl-voice-anim__line-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.pl-landing-time .pl-voice-anim__route {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    flex: 1;
    opacity: 0;
    transform: translateY(10px);
    animation: plVoiceRouteIn var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__hub {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    text-align: center;
}

body.pl-landing-time .pl-voice-anim__hub::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 18px;
    margin-left: -1px;
    background: #d1d5db;
    border-radius: 1px;
    transform: translateY(100%) scaleY(0);
    transform-origin: top center;
    animation: plVoiceHubStem var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__hub span {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
}

body.pl-landing-time .pl-voice-anim__hub strong {
    font-size: 10px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
}

body.pl-landing-time .pl-voice-anim__fork {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 18px;
}

body.pl-landing-time .pl-voice-anim__branches {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

/* Horizontal fork across the three callee columns */
body.pl-landing-time .pl-voice-anim__branches::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc((100% - 8px) / 6);
    right: calc((100% - 8px) / 6);
    height: 2px;
    border-radius: 1px;
    background: #d1d5db;
    transform: scaleX(0);
    transform-origin: center;
    animation: plVoiceTreeBar var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
}

/* Vertical stem from the bar down into each callee avatar */
body.pl-landing-time .pl-voice-anim__branch::before {
    content: "";
    width: 2px;
    flex: 1 1 auto;
    min-height: 18px;
    margin-bottom: -2px;
    border-radius: 1px;
    background: #d1d5db;
    transform: scaleY(0);
    transform-origin: top center;
    animation: plVoiceTreeStem var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: center;
}

body.pl-landing-time .pl-voice-anim__person-av {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.02em;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 4px rgba(0, 0, 0, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.12);
}

body.pl-landing-time .pl-voice-anim__person-av i {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(17, 17, 17, 0.28);
    opacity: 0;
    pointer-events: none;
}

body.pl-landing-time .pl-voice-anim__person-av i:nth-child(2) {
    inset: -6px;
}

body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-av {
    animation:
        plVoiceMissAv var(--voice-cycle) ease-in-out 1 forwards,
        plVoicePersonShake var(--voice-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-av i {
    animation: plVoicePersonRing var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-av i:nth-child(2) {
    animation: plVoicePersonRing var(--voice-cycle) ease-out 0.35s 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--busy .pl-voice-anim__person-av {
    animation: plVoiceBusyAv var(--voice-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--busy .pl-voice-anim__person-av i {
    animation: none;
    opacity: 0;
}

body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-av {
    animation:
        plVoiceAnswerAv var(--voice-cycle) ease-in-out 1 forwards,
        plVoicePersonShake var(--voice-cycle) ease-in-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-av i {
    animation: plVoicePersonRing var(--voice-cycle) ease-out 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-av i:nth-child(2) {
    animation: plVoicePersonRing var(--voice-cycle) ease-out 0.35s 1 forwards;
}

body.pl-landing-time .pl-voice-anim__person-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

body.pl-landing-time .pl-voice-anim__person-meta strong {
    font-size: 10px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #111;
    line-height: 1.15;
}

body.pl-landing-time .pl-voice-anim__person-meta em {
    font-style: normal;
    font-size: 8px;
    font-weight: 500;
    color: #9ca3af;
}

body.pl-landing-time .pl-voice-anim__person-state {
    font-size: 0;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.pl-landing-time .pl-voice-anim__person-state::after {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 16px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    content: "Waiting";
    color: #9ca3af;
}

body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-state::after {
    animation: plVoiceStateMiss var(--voice-cycle) steps(1, end) 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--busy .pl-voice-anim__person-state::after {
    animation: plVoiceStateBusy var(--voice-cycle) steps(1, end) 1 forwards;
}

body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-state::after {
    animation: plVoiceStateAnswer var(--voice-cycle) steps(1, end) 1 forwards;
}

@keyframes plVoiceCallFrame {
    0%, 5% {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }
    12%, 100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes plVoiceBannerPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes plVoiceAvatarPulse {
    0%, 8% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
    16%, 40% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes plVoiceRing {
    0%, 8% { opacity: 0; transform: scale(0.55); }
    14% { opacity: 0.6; transform: scale(0.8); }
    36% { opacity: 0; transform: scale(1.7); }
    100% { opacity: 0; transform: scale(1.7); }
}

@keyframes plVoiceRouteIn {
    0%, 28% { opacity: 0; transform: translateY(12px); }
    36%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes plVoiceTreeBar {
    0%, 32% { transform: scaleX(0); opacity: 0; }
    33% { opacity: 1; }
    38%, 100% { transform: scaleX(1); opacity: 1; }
}

@keyframes plVoiceTreeStem {
    0%, 36% { transform: scaleY(0); opacity: 0; }
    38% { opacity: 1; }
    44%, 100% { transform: scaleY(1); opacity: 1; }
}

@keyframes plVoiceHubStem {
    0%, 32% { transform: translateY(100%) scaleY(0); opacity: 0; }
    33% { opacity: 1; }
    38%, 100% { transform: translateY(100%) scaleY(1); opacity: 1; }
}

@keyframes plVoiceAnswerAv {
    0%, 38% {
        background: #111;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 4px rgba(0, 0, 0, 0.08),
            0 8px 18px rgba(0, 0, 0, 0.12);
    }
    44%, 68% {
        background: #111;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px rgba(17, 17, 17, 0.35),
            0 8px 18px rgba(0, 0, 0, 0.14);
    }
    74%, 100% {
        background: #16a34a;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px rgba(22, 163, 74, 0.45),
            0 10px 22px rgba(22, 163, 74, 0.28);
    }
}

@keyframes plVoiceBusyAv {
    0%, 72% {
        background: #d97706;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px rgba(245, 158, 11, 0.45),
            0 8px 18px rgba(245, 158, 11, 0.22);
    }
    76%, 100% {
        background: #9ca3af;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 4px rgba(0, 0, 0, 0.08),
            0 6px 14px rgba(0, 0, 0, 0.08);
    }
}

@keyframes plVoiceMissAv {
    0%, 38% {
        background: #111;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 4px rgba(0, 0, 0, 0.08),
            0 8px 18px rgba(0, 0, 0, 0.12);
        opacity: 1;
    }
    44%, 68% {
        background: #111;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px rgba(17, 17, 17, 0.35),
            0 8px 18px rgba(0, 0, 0, 0.14);
        opacity: 1;
    }
    76%, 100% {
        background: #9ca3af;
        color: #fff;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 4px rgba(0, 0, 0, 0.06),
            0 6px 14px rgba(0, 0, 0, 0.06);
        opacity: 0.72;
    }
}

@keyframes plVoicePersonRing {
    0%, 42% { opacity: 0; transform: scale(0.72); }
    48% { opacity: 0.7; transform: scale(0.95); }
    62% { opacity: 0; transform: scale(1.55); }
    100% { opacity: 0; transform: scale(1.55); }
}

/* Shake circular avatars while state is "Ringing" (~41–70%). */
@keyframes plVoicePersonShake {
    0%, 41% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    43% { transform: translate3d(-2px, 0, 0) rotate(-2deg); }
    45% { transform: translate3d(2px, 0, 0) rotate(2deg); }
    47% { transform: translate3d(-2px, 0, 0) rotate(-1.6deg); }
    49% { transform: translate3d(2px, 0, 0) rotate(1.6deg); }
    51% { transform: translate3d(-1.5px, 0, 0) rotate(-1.2deg); }
    53% { transform: translate3d(1.5px, 0, 0) rotate(1.2deg); }
    55% { transform: translate3d(-2px, 0, 0) rotate(-1.8deg); }
    57% { transform: translate3d(2px, 0, 0) rotate(1.8deg); }
    59% { transform: translate3d(-1.2px, 0, 0) rotate(-1deg); }
    61% { transform: translate3d(1.2px, 0, 0) rotate(1deg); }
    63% { transform: translate3d(-1.6px, 0, 0) rotate(-1.4deg); }
    65% { transform: translate3d(1.6px, 0, 0) rotate(1.4deg); }
    67% { transform: translate3d(-0.8px, 0, 0) rotate(-0.6deg); }
    69%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
}

@keyframes plVoiceStateBusy {
    0%, 72% {
        content: "On call";
        color: #b45309;
        background: #fffbeb;
    }
    73%, 100% {
        content: "On call";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }
}

@keyframes plVoiceStateMiss {
    0%, 40% {
        content: "Waiting";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }
    41%, 70% {
        content: "Ringing";
        color: #111;
        background: rgba(0, 0, 0, 0.08);
    }
    71%, 100% {
        content: "Missed";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }
}

@keyframes plVoiceStateAnswer {
    0%, 40% {
        content: "Waiting";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }
    41%, 70% {
        content: "Ringing";
        color: #111;
        background: rgba(0, 0, 0, 0.08);
    }
    73%, 100% {
        content: "On call";
        color: #15803d;
        background: #f0fdf4;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-landing-time .pl-voice-anim__call,
    body.pl-landing-time .pl-voice-anim__rings i,
    body.pl-landing-time .pl-voice-anim__banner,
    body.pl-landing-time .pl-voice-anim__avatar,
    body.pl-landing-time .pl-voice-anim__route,
    body.pl-landing-time .pl-voice-anim__hub::after,
    body.pl-landing-time .pl-voice-anim__branches::before,
    body.pl-landing-time .pl-voice-anim__branch::before,
    body.pl-landing-time .pl-voice-anim__person-av,
    body.pl-landing-time .pl-voice-anim__person-av i,
    body.pl-landing-time .pl-voice-anim__person-state::after {
        animation: none !important;
    }

    body.pl-landing-time .pl-voice-anim__call,
    body.pl-landing-time .pl-voice-anim__route {
        opacity: 1;
        transform: none;
    }

    body.pl-landing-time .pl-voice-anim__branches::before {
        transform: scaleX(1);
        opacity: 1;
    }

    body.pl-landing-time .pl-voice-anim__branch::before {
        transform: scaleY(1);
        opacity: 1;
    }

    body.pl-landing-time .pl-voice-anim__hub::after {
        transform: translateY(100%) scaleY(1);
        opacity: 1;
    }

    body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-av {
        background: #16a34a;
        box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px rgba(22, 163, 74, 0.45),
            0 10px 22px rgba(22, 163, 74, 0.28);
    }

    body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-av {
        background: #9ca3af;
        opacity: 0.72;
    }

    body.pl-landing-time .pl-voice-anim__branch--a .pl-voice-anim__person-state::after {
        content: "Missed";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }

    body.pl-landing-time .pl-voice-anim__branch--busy .pl-voice-anim__person-av {
        background: #9ca3af;
    }

    body.pl-landing-time .pl-voice-anim__branch--busy .pl-voice-anim__person-state::after {
        content: "On call";
        color: #9ca3af;
        background: rgba(0, 0, 0, 0.04);
    }

    body.pl-landing-time .pl-voice-anim__branch--answer .pl-voice-anim__person-state::after {
        content: "On call";
        color: #15803d;
        background: #f0fdf4;
    }
}

