/* Services page "What we do", part 4 of 5: the chapters and their service cards, outcome
   chips, the "What we do" toggle and the call to action. */

/* ---------- Chapters and services ---------- */
.wwd-chapter + .wwd-chapter {
    margin-top: 6rem;
}

.wwd-chapter,
.wwd-service {
    scroll-margin-top: calc(var(--wwd-sticky-top, 4.5rem) + 5rem);
}

@media (min-width: 1024px) {
    .wwd-chapter,
    .wwd-service {
        scroll-margin-top: calc(var(--wwd-sticky-top, 4.5rem) + 2rem);
    }
}

.wwd-chapter__label {
    display: flex;
    align-items: center;
    margin: 0 0 1rem;
    color: var(--accent-ink);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wwd-chapter__title {
    margin: 0;
    color: var(--wwd-ink);
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.wwd-chapter__text {
    max-width: 38rem;
    margin: 1rem 0 0;
    font-size: 1.1rem;
    line-height: 1.65;
}

.wwd-service {
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    padding: 1.75rem 1.4rem;
    border: 1px solid var(--wwd-line);
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 30px 60px -50px rgba(15, 23, 42, 0.45);
}

@media (min-width: 640px) {
    .wwd-service {
        padding: 2.5rem 2.5rem 2.25rem;
    }
}

.wwd-service__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    color: var(--accent-ink);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wwd-service__name > span {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: var(--accent-soft);
    letter-spacing: 0;
}

.wwd-service__title {
    position: relative;
    margin: 1.1rem 0 0;
    color: var(--wwd-ink);
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.wwd-service__text {
    position: relative;
    max-width: 40rem;
    margin: 0.75rem 0 0;
    font-size: 1.05rem;
    line-height: 1.65;
}

/* What changes for you: three compact outcome chips */
.wwd-service__outcomes {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.wwd-service__outcomes li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem 0.55rem 0.65rem;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--wwd-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.wwd-service__outcomes li::before {
    content: "";
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l3.8 3.8L18 8.5'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

/* Footer: the "What we do" toggle and the call to action */
.wwd-service__foot {
    position: relative;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wwd-line);
}

.wwd-service__more summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--wwd-ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.wwd-service__more summary::-webkit-details-marker {
    display: none;
}

.wwd-service__more summary::after {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    margin-top: -0.2rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s var(--wwd-ease), margin 0.25s var(--wwd-ease);
}

.wwd-service__more[open] summary::after {
    margin-top: 0.25rem;
    transform: rotate(-135deg);
}

.wwd-service__more summary:focus-visible {
    outline: 2px solid var(--wwd-trust);
    outline-offset: 3px;
    border-radius: 4px;
}

.wwd-service__more ul {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .wwd-service__more ul {
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }
}

.wwd-service__more li {
    position: relative;
    padding-left: 1.1rem;
    line-height: 1.5;
}

.wwd-service__more li::before {
    content: "";
    position: absolute;
    top: 0.6rem;
    left: 0;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--accent);
}

.wwd-service__more[open] ul {
    animation: wwd-more-in 0.4s var(--wwd-ease);
}

@keyframes wwd-more-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.wwd-service__fit {
    margin: 1rem 0 0;
    color: var(--wwd-body);
    font-size: 0.95rem;
    line-height: 1.55;
}

.wwd-service__fit strong {
    color: var(--wwd-ink);
}

/* Pinned to the toggle's row, so opening the toggle only grows the content. */
.wwd-service__cta {
    position: absolute;
    top: 1.25rem;
    right: 0;
    color: var(--accent-ink);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.wwd-service__cta span {
    display: inline-block;
    transition: transform 0.25s var(--wwd-ease);
}

.wwd-service__cta:hover span {
    transform: translateX(4px);
}

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