/* Case studies index */

.csl-page {
    --csl-ink: #1c1917;
    --csl-muted: #5c564e;
    --csl-line: #e7e2da;
    --csl-paper: #f6f4f0;
    --csl-card: #fff;
    background: var(--csl-paper);
    color: var(--csl-ink);
    padding: 3.5rem 0 5rem;
}

.csl-kicker {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0068ce;
}

.csl-title {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.csl-lead {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--csl-muted);
}

.csl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.25rem 0 1.75rem;
}

.csl-filter {
    border: 1px solid var(--csl-line);
    background: transparent;
    color: var(--csl-ink);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.csl-filter.is-active {
    background: var(--csl-ink);
    border-color: var(--csl-ink);
    color: #fff;
}

.csl-feature {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--csl-card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
    margin-bottom: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.csl-feature:hover {
    color: inherit;
    text-decoration: none;
}

.csl-feature-media {
    min-height: 18rem;
    background: #ddd6cc center / cover no-repeat;
}

.csl-feature-body {
    padding: 1.75rem 1.5rem 1.9rem;
}

.csl-chip {
    display: inline;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #e1f2fa;
    color: #0068ce;
}

.csl-chip--restrogreen { background: #e6f3f2; color: #00897b; }
.csl-chip--retailgo { background: #d7e6f5; color: #003a72; }
.csl-chip--oneoffice { background: #eeeaf3; color: #512888; }
.csl-chip--courtsync { background: #f3eee4; color: #8a5a12; }
.csl-chip--quickly { background: #eceae6; color: #1c1917; }

.csl-feature h2 {
    margin: 0.9rem 0 0.75rem;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.csl-feature p,
.csl-card p {
    margin: 0;
    color: var(--csl-muted);
    line-height: 1.65;
}

.csl-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    font-weight: 700;
    color: var(--csl-ink);
}

.csl-feature:hover .csl-more,
.csl-card:hover .csl-more {
    gap: 0.7rem;
}

.csl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.csl-card {
    display: flex;
    flex-direction: column;
    background: var(--csl-card);
    border-radius: 22px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(28, 25, 23, 0.05);
    min-height: 100%;
}

.csl-card:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
}

.csl-card-media {
    aspect-ratio: 16 / 10;
    background: #ddd6cc center / cover no-repeat;
}

.csl-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.2rem 1.2rem 1.35rem;
    flex: 1 1 auto;
}

.csl-card h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.csl-card .csl-more {
    margin-top: auto;
}

.csl-empty {
    display: none;
    margin: 2rem 0 0;
    color: var(--csl-muted);
}

.csl-empty.is-visible {
    display: block;
}

@media (min-width: 768px) {
    .csl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .csl-feature {
        grid-template-columns: 1.15fr 0.85fr;
        min-height: 28rem;
    }

    .csl-feature-media {
        min-height: 100%;
    }

    .csl-feature-body {
        padding: 2.5rem 2.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .csl-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
