/* Projects: cards, archive and single case study.
   Loaded on the projects archive/single, and anywhere project cards appear. */

/* ── Archive filters ─────────────────────────────────────────────────── */
.ps-projects__filters {
    background: #fff;
    border-bottom: 1px solid #e6ebf2;
    padding: 0.9rem 0;
}

.ps-projects__filters .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ps-projects__filter {
    padding: 0.4rem 1rem;
    border: 1px solid #e3eaf2;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #16425b;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ps-projects__filter:hover {
    border-color: #bcd8ea;
    color: #0f6fa9;
}

.ps-projects__filter.is-active {
    background: linear-gradient(135deg, #2a8ec7 0%, #16425b 100%);
    border-color: transparent;
    color: #fff;
}

/* ── Grid ────────────────────────────────────────────────────────────── */
.ps-projects__grid-wrap {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: #f7f9fc;
}

.ps-projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ps-projects__empty {
    color: #64748b;
    font-size: 1rem;
    max-width: 60ch;
}

.ps-projects__pagination {
    margin-top: 2rem;
}

/* ── Card ────────────────────────────────────────────────────────────── */
.ps-project-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 0.9rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ps-project-card:hover {
    transform: translateY(-4px);
    border-color: #cfe0ec;
    box-shadow: 0 1rem 2rem rgba(15, 42, 60, 0.14);
}

.ps-project-card__img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #eef3f8 center/cover no-repeat;
    color: #b6c6d5;
    font-size: 2rem;
}

.ps-project-card__tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(11, 32, 46, 0.82);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 2rem;
}

.ps-project-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.25rem 1.25rem;
    flex: 1 1 auto;
}

.ps-project-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #16425b;
    line-height: 1.25;
}

.ps-project-card__meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f6fa9;
}

.ps-project-card__text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
    flex: 1 1 auto;
}

.ps-project-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.6rem;
    margin-top: 0.2rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.8rem;
}

.ps-project-card__size {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-weight: 600;
}

.ps-project-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #0f6fa9;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Single case study ───────────────────────────────────────────────── */
.ps-project__hero {
    position: relative;
    background: #16425b center/cover no-repeat;
    color: #fff;
    isolation: isolate;
}

.ps-project__hero--noimg {
    background: linear-gradient(135deg, #2a8ec7 0%, #16425b 100%);
}

.ps-project__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11, 32, 46, 0.92) 0%, rgba(11, 32, 46, 0.55) 55%, rgba(11, 32, 46, 0.35) 100%);
    z-index: -1;
}

.ps-project__hero-inner {
    padding-top: clamp(3rem, 7vw, 6rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ps-project__crumbs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.72);
}

.ps-project__crumbs a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 600;
}

.ps-project__crumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

.ps-project__crumbs i {
    font-size: 0.6rem;
}

.ps-project__tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 2rem;
    padding: 0.28rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.ps-project__title {
    font-size: clamp(1.9rem, 4.2vw, 3.3rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
    max-width: 20ch;
    margin: 0;
}

.ps-project__facts {
    background: #fff;
    border-bottom: 1px solid #e6ebf2;
    padding: 1.5rem 0;
}

.ps-project__facts dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem 2rem;
    margin: 0;
}

.ps-project__facts dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.ps-project__facts dd {
    font-size: 1rem;
    font-weight: 700;
    color: #16425b;
    margin: 0;
}

.ps-project__story {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.ps-project__block {
    margin-bottom: 2rem;
}

.ps-project__block h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #16425b;
    margin-bottom: 0.7rem;
}

.ps-project__block p {
    font-size: 1rem;
    line-height: 1.65;
    color: #475569;
}

.ps-project__quote {
    border-left: 4px solid #2a8ec7;
    background: #f7f9fc;
    border-radius: 0 0.6rem 0.6rem 0;
    padding: 1.25rem 1.5rem;
    margin: 0;
}

.ps-project__quote p {
    font-size: 1.1rem;
    line-height: 1.55;
    font-style: italic;
    color: #16425b;
    margin-bottom: 0.6rem;
}

.ps-project__quote cite {
    font-size: 0.85rem;
    font-weight: 700;
    font-style: normal;
    color: #64748b;
}

.ps-project__aside {
    position: sticky;
    top: 6rem;
}

.ps-project__gallery {
    padding: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.ps-project__gallery-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #16425b;
    margin-bottom: 1.1rem;
}

.ps-project__gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ps-project__gallery-grid figure {
    margin: 0;
    border-radius: 0.7rem;
    overflow: hidden;
    background: #eef3f8;
}

.ps-project__gallery-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease;
}

.ps-project__gallery-grid figure:hover img {
    transform: scale(1.04);
}

@media (max-width: 991.98px) {
    .ps-project__aside {
        position: static;
    }
}
