.work-page {
    --work-ink: #131c2d;
    --work-muted: #566176;
    --work-border: #e0e4e9;
    color: var(--work-ink);
    background: #fff;
    overflow-wrap: anywhere;
}

.work-page .page-banner:not(:has(.page-banner-image)) {
    min-height: auto;
    padding-block: clamp(105px, 14vw, 195px) clamp(35px, 5vw, 76px);
}

.work-intro {
    padding: clamp(36px, 6vw, 90px) var(--page-gutter);
    background: #fff;
    text-align: center;
}

.work-intro-content {
    max-width: 1050px;
    margin-inline: auto;
    font-size: var(--body-font-size);
    line-height: 1.8;
}

.work-intro-content > :last-child,
.work-prose > :last-child {
    margin-bottom: 0;
}

.work-projects {
    padding: clamp(32px, 4vw, 64px) var(--page-gutter) clamp(60px, 7vw, 110px);
    background: #f7f7f7;
}

.work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1680px;
    margin: 0 auto clamp(24px, 3vw, 42px);
}

.work-filters[hidden],
.work-project[hidden] {
    display: none;
}

.work-filter {
    padding: 12px clamp(16px, 2vw, 26px);
    border: 1px solid #d7ddea;
    border-radius: 5px;
    background: #fff;
    color: var(--color-navy);
    font: inherit;
    cursor: pointer;
}

.work-filter:hover {
    border-color: var(--color-navy);
}

.work-filter[aria-pressed="true"] {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: #fff;
}

.work-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 36px);
    max-width: 1680px;
    margin-inline: auto;
}

.work-project {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--work-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px #1623330e;
    transition: box-shadow .2s ease;
}

.work-project:focus-within,
.work-project:hover {
    box-shadow: 0 12px 30px #16233322;
}

.work-project-media {
    position: relative;
    background: #edf1f2;
}

.work-project-media:not(:has(img)) {
    min-height: 60px;
}

.work-project-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.work-project-category {
    position: absolute;
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    padding: 7px 16px;
    border-radius: 100px;
    background: #fffffff2;
    box-shadow: 0 3px 12px #1c2c381c;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.work-project-caption {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(16px, 1.65vw, 28px);
}

.work-project-caption h2 {
    margin: 0;
    color: #0d131d;
    font-size: clamp(1.05rem, 1.5vw, 1.55rem);
    line-height: 1.3;
    letter-spacing: -.02em;
}

.work-project-caption h2 a {
    color: inherit;
    text-decoration: none;
}

.work-project-caption h2 a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.work-project-caption p,
.work-empty {
    margin: 0;
    color: var(--work-muted);
    line-height: 1.65;
}

.work-project-link {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding: 10px 18px;
    border-radius: 9px;
    background: var(--color-navy);

    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.work-project-link:hover {
    background: #142140;
}

.work-empty {
    padding-block: 30px;
    text-align: center;
}

.work-single .page-banner:not(:has(.page-banner-image)) {
    padding-top: clamp(140px, 14vw, 195px);
    background: #fff;
    color: var(--color-navy);
}

.work-single .page-banner:not(:has(.page-banner-image))::before {
    content: none;
}

.work-single .page-banner:not(:has(.page-banner-image)) .breadcrumb a,
.work-single .page-banner:not(:has(.page-banner-image)) .banner-subtitle {
    color: var(--color-navy);
}

.work-single .page-banner:not(:has(.page-banner-image)) .breadcrumb li + li::before,
.work-single .page-banner:not(:has(.page-banner-image)) .breadcrumb [aria-current="page"] {
    color: var(--work-muted);
}

body.single-our-work:has(.page-banner:not(:has(.page-banner-image))) .site-header:not(.is-scrolled) {
    background: var(--color-navy);
}

.work-detail {
    max-width: 1500px;
    margin-inline: auto;
    padding: clamp(32px, 5vw, 76px) var(--page-gutter) clamp(60px, 7vw, 110px);
}

.work-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 32fr) minmax(0, 68fr);
    gap: clamp(28px, 4vw, 56px);
}

.work-facts {
    padding: clamp(18px, 2.3vw, 34px);
    background: #f8f9fc;
    border: 1px solid var(--work-border);
    border-radius: 17px;
}

.work-facts h2 {
    margin: 0 0 16px;
    color: var(--work-muted);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.work-facts dl {
    display: grid;
    margin: 0;
}

.work-facts dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--work-border);
}

.work-facts dt {
    color: var(--work-muted);
}

.work-facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.work-tags a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--work-border);
    border-radius: 100px;
    background: #f7f8f9;
    color: inherit;
    font-size: .82rem;
    text-decoration: none;
}

.work-tags a:hover {
    background: #e9eef0;
}

.work-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr));
    gap: 10px;
    margin-top: 22px;
}

.work-actions:first-child {
    margin-top: 0;
}

.work-actions a,
.work-actions button {
    padding: 10px;
    border: 1px solid var(--work-border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.work-actions a {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: #fff;
}

.work-actions a:hover {
    background: #142140;
}

.work-actions button:hover {
    background: #f3f5f6;
}

.work-copy-status {
    margin: 8px 0 0;
    font-size: .82rem;
}

.work-copy-status:empty {
    margin: 0;
}

.work-prose {
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    line-height: 1.65;
}

.work-prose > :first-child {
    margin-top: 0;
}

.work-summary {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--work-border);
    border-radius: 10px;
    background: #fff;
    font-size: .95rem;
}

.work-main-image {
    margin-top: clamp(20px, 3vw, 42px);
}

.work-main-image img,
.work-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.work-gallery {
    margin-top: clamp(34px, 5vw, 72px);
}

.work-gallery h2 {
    margin: 0 0 18px;
}

.work-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.work-gallery-item {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    cursor: zoom-in;
}

.work-gallery-item:hover img {
    filter: brightness(.88);
}

.work-lightbox {
    max-width: min(94vw, 1400px);
    max-height: 94vh;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #111827;
}

.work-lightbox::backdrop {
    background: #07101be0;
}

.work-lightbox img {
    width: auto;
    max-width: 100%;
    max-height: 88vh;
    aspect-ratio: auto;
    object-fit: contain;
}

.work-lightbox form {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.work-lightbox button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--color-navy);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

body:has(.work-lightbox[open]) {
    overflow: hidden;
}

.work-gallery-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (max-width: 900px) {
    .work-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 740px) {
    .work-detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .work-project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}
