/* Services page "What we do", part 2 of 5: the before/after comparison you drag, and the
   Connect -> Trust -> Act pills under it. Colours come from what-we-do.css. */

/* ---------- Intro: before / after ---------- */
.wwd__intro-head {
    display: grid;
    gap: 1.25rem;
    align-items: end;
    margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
    .wwd__intro-head {
        grid-template-columns: 1.3fr 1fr;
        gap: 4rem;
    }
}

.wwd__kicker {
    margin: 0 0 1rem;
    color: var(--wwd-trust);
    font-size: 0.95rem;
    font-weight: 600;
}

.wwd__title {
    max-width: 38rem;
    margin: 0;
    color: var(--wwd-ink);
    font-size: clamp(2.25rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.wwd__lede {
    max-width: 26rem;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* The comparison. Both layers fill the frame; the "after" layer is clipped at --split.
   Sizes inside are in em, so one font-size scales the whole scene on small screens. */
.wwd-compare {
    --split: 50%;
    position: relative;
    height: 22em;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 0 0 1px var(--wwd-line);
    font-size: 0.62rem;
    touch-action: pan-y;
    user-select: none;
    cursor: ew-resize;
}

@media (min-width: 560px) {
    .wwd-compare {
        font-size: 0.8rem;
    }
}

@media (min-width: 900px) {
    .wwd-compare {
        font-size: 1rem;
    }
}

.wwd-compare__layer {
    position: absolute;
    inset: 0;
}

.wwd-compare__before {
    background: #F1F2F6;
}

.wwd-compare__after {
    background: linear-gradient(160deg, var(--kd-brand-soft), #E6F5FD);
    clip-path: inset(0 0 0 var(--split));
}

.wwd-compare__tag {
    position: absolute;
    top: 1.25em;
    left: 1.5em;
    padding: 0.35em 0.85em;
    border-radius: 999px;
    background: #FFFFFF;
    color: var(--kd-muted);
    font-size: 0.75em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wwd-compare__tag--after {
    right: 1.5em;
    left: auto;
    color: var(--wwd-trust-ink);
}

/* Before: a pile of reports that disagree */
.wwd-paper {
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 10em;
    padding: 0.8em 0.85em;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 12px 24px -14px rgba(15, 23, 42, 0.4);
    transform: rotate(var(--r));
    animation: wwd-paper-drift 6s ease-in-out infinite alternate;
}

.wwd-paper:nth-child(odd) {
    animation-delay: -3s;
}

@keyframes wwd-paper-drift {
    to {
        transform: rotate(calc(var(--r) * -0.4)) translateY(-0.35em);
    }
}

.wwd-paper small {
    display: block;
    color: var(--kd-faint);
    font-size: 0.68em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wwd-paper strong {
    display: block;
    margin: 0.2em 0 0.4em;
    color: var(--kd-ink-soft);
    font-size: 1.35em;
    letter-spacing: -0.02em;
}

.wwd-paper em {
    display: inline-block;
    padding: 0.12em 0.5em;
    border-radius: 999px;
    background: #FEE2E2;
    color: #B91C1C;
    font-size: 0.68em;
    font-style: normal;
    font-weight: 700;
}

.wwd-paper i {
    display: block;
    width: 78%;
    height: 0.35em;
    margin-top: 0.35em;
    border-radius: 9px;
    background: var(--kd-line);
}

.wwd-paper i:last-child {
    width: 55%;
}

/* After: every source synced, feeding one trusted dashboard */
.wwd-sources {
    position: absolute;
    top: 50%;
    left: 24%;
    width: 15em;
    padding: 1.1em 1.2em 1em;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 24px 44px -26px rgba(15, 23, 42, 0.45);
    transform: translate(-50%, -50%) rotate(-2deg);
}

.wwd-sources small {
    color: var(--kd-muted);
    font-size: 0.75em;
    font-weight: 700;
}

.wwd-sources ul {
    margin: 0.6em 0 0;
    padding: 0;
    list-style: none;
}

.wwd-sources li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0;
    border-top: 1px solid #EEF1F6;
    color: var(--kd-ink-soft);
    font-size: 0.85em;
    font-weight: 600;
}

.wwd-sources li span {
    padding: 0.15em 0.55em;
    border-radius: 999px;
    background: var(--wwd-connect-soft);
    color: var(--wwd-connect-ink);
    font-size: 0.8em;
}

.wwd-sources__foot {
    margin: 0.6em 0 0;
    padding-top: 0.6em;
    border-top: 1px solid #EEF1F6;
    color: var(--kd-muted);
    font-size: 0.7em;
    font-weight: 600;
}

/* After: one trusted dashboard */
.wwd-board {
    position: absolute;
    top: 50%;
    left: 68%;
    width: 21em;
    padding: 1.3em 1.4em 1.1em;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 30px 50px -28px rgba(15, 23, 42, 0.5);
    transform: translate(-50%, -50%);
}

.wwd-board small {
    color: var(--kd-muted);
    font-size: 0.75em;
    font-weight: 700;
}

.wwd-board strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6em;
    margin: 0.25em 0 0.9em;
    color: var(--wwd-ink);
    font-size: 2em;
    letter-spacing: -0.03em;
}

.wwd-board strong span {
    padding: 0.2em 0.6em;
    border-radius: 999px;
    background: var(--wwd-connect-soft);
    color: var(--wwd-connect-ink);
    font-size: 0.36em;
    letter-spacing: 0;
}

.wwd-board__bars {
    display: flex;
    align-items: end;
    gap: 0.45em;
    height: 4.5em;
}

.wwd-board__bars i {
    flex: 1;
    height: var(--h);
    border-radius: 5px;
    background: #C7D7F2;
}

.wwd-board__bars i:last-child {
    background: var(--wwd-trust);
}

.wwd-board__foot {
    display: flex;
    gap: 0.4em;
    margin: 0.9em 0 0;
}

.wwd-board__foot span {
    padding: 0.2em 0.55em;
    border-radius: 6px;
    background: #F1F5F9;
    color: var(--kd-body);
    font-size: 0.68em;
    font-weight: 600;
}

/* Divider and handle */
.wwd-compare__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    width: 3px;
    margin-left: -1.5px;
    background: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
    pointer-events: none;
}

.wwd-compare__handle {
    position: absolute;
    top: 50%;
    left: var(--split);
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin: -1.625rem 0 0 -1.625rem;
    border: 0;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.45);
    color: var(--wwd-trust);
    cursor: ew-resize;
    transition: transform 0.2s var(--wwd-ease);
}

.wwd-compare__handle:hover,
.wwd-compare.is-dragging .wwd-compare__handle {
    transform: scale(1.08);
}

.wwd-compare__handle svg {
    width: 1.3rem;
    height: 1.3rem;
}

.wwd-compare__handle:focus-visible {
    outline: 3px solid var(--wwd-trust);
    outline-offset: 3px;
}

/* Connect -> Trust -> Act */
.wwd-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.wwd-path__arrow {
    color: var(--wwd-muted);
}

.wwd-path__step {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    background: #F5F7FB;
    color: var(--wwd-ink);
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s var(--wwd-ease);
}

.wwd-path__step:hover {
    background: #EDF1F8;
    transform: translateY(-2px);
}
