.work-page {
    overflow: hidden;
    background: #fff;
    color: #17191b;
}

.work-page .container {
    width: min(100% - 40px, 1320px);
    max-width: 1320px;
}

.work-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    overflow: hidden;
    background: #131518;
}

.work-hero::before,
.work-hero::after {
    position: absolute;
    inset: 0;
    content: '';
}

.work-hero::before {
    z-index: -2;
    background-image: var(--work-hero-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.work-hero::after {
    z-index: -1;
    background: linear-gradient(90deg, rgba(15, 17, 20, .96) 0%, rgba(15, 17, 20, .78) 42%, rgba(15, 17, 20, .28) 100%);
}

.work-hero--compact {
    min-height: 390px;
    background: radial-gradient(circle at 78% 28%, rgba(132, 42, 249, .26), transparent 27%), #15171a;
}

.work-hero--compact::before {
    display: none;
}

.work-hero--compact::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, .025), transparent 50%);
}

.work-hero__inner {
    padding-top: 100px;
    padding-bottom: clamp(64px, 8vw, 104px);
}

.work-hero h1,
.work-section h2 {
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
}

.work-hero h1 {
    max-width: 980px;
    margin: 0;
    color: #fff;
    font-size: clamp(58px, 7.2vw, 104px);
    letter-spacing: -.025em;
    line-height: .95;
}

.work-hero__subtitle {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.5;
}

.work-eyebrow {
    margin: 0 0 18px;
    color: #842af9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3em;
    line-height: 1.4;
    text-transform: uppercase;
}

.work-hero .work-eyebrow {
    color: #b678ff;
}

.work-section {
    padding: clamp(72px, 8vw, 116px) 0;
}

.work-section--soft {
    background: #f5f5f7;
}

.work-section-heading {
    max-width: 800px;
    margin-bottom: 44px;
}

.work-section-heading--split {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.work-section h2 {
    margin: 0;
    color: #17191b;
    font-size: clamp(42px, 5vw, 68px);
    letter-spacing: -.025em;
    line-height: 1;
}

.service-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(50px, 8vw, 124px);
    align-items: start;
}

.service-intro__copy {
    color: #555b62;
    font-size: 19px;
    line-height: 1.72;
}

.service-intro__copy > :first-child {
    margin-top: 0;
}

.service-intro__copy > :last-child {
    margin-bottom: 0;
}

.service-reasons__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.service-reason-card {
    min-height: 340px;
    padding: 34px;
    border: 1px solid #e2e2e7;
    background: #fff;
}

.service-reason-card__number {
    display: block;
    margin-bottom: 70px;
    color: #842af9;
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-size: 18px;
}

.service-reason-card h3 {
    margin: 0 0 16px;
    color: #17191b;
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.08;
    text-transform: uppercase;
}

.service-reason-card p {
    margin: 0;
    color: #686d73;
    font-size: 16px;
    line-height: 1.6;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border: 2px solid #842af9;
    color: #842af9;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.work-link:hover,
.work-link:focus {
    background: #842af9;
    color: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px 24px;
}

.project-grid--archive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card[hidden] {
    display: none;
}

.project-card__link {
    display: block;
    color: inherit;
}

.project-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    margin: 0 0 20px;
    overflow: hidden;
    background: #e9e9ec;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.project-card__link:hover .project-card__image img,
.project-card__link:focus .project-card__image img {
    transform: scale(1.035);
}

.project-card__arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: #842af9;
    color: #fff;
    font-size: 23px;
    line-height: 1;
}

.project-card__body p {
    margin: 0 0 7px;
    color: #842af9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.project-card__body h3 {
    margin: 0;
    color: #17191b;
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-size: clamp(26px, 2.4vw, 38px);
    font-weight: 500;
    line-height: 1.06;
    text-transform: uppercase;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 48px;
}

.project-filter {
    min-height: 45px;
    padding: 10px 17px;
    border: 1px solid #d8d8de;
    background: #fff;
    color: #3f4348;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.project-filter:hover,
.project-filter:focus,
.project-filter.is-active {
    border-color: #842af9;
    background: #842af9;
    color: #fff;
}

.project-grid__empty {
    margin: 50px 0 0;
    color: #686d73;
    font-size: 18px;
}

.project-detail__cover {
    position: relative;
    z-index: 2;
    margin-top: -48px;
    margin-bottom: 0;
    padding: 0;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: #e9e9ec;
}

.project-detail__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-comparison__layout {
    display: grid;
    grid-template-columns: minmax(260px, .68fr) minmax(0, 1.45fr);
    gap: clamp(44px, 6vw, 90px);
    align-items: center;
}

.project-comparison__copy h2 {
    margin-bottom: 24px;
}

.project-comparison__text {
    color: #646970;
    font-size: 17px;
    line-height: 1.65;
}

.project-comparison__text > :last-child {
    margin-bottom: 0;
}

.project-comparison .before-after-comparison {
    width: 100%;
    max-width: none;
    box-shadow: 0 24px 60px rgba(20, 20, 24, .16);
}

.project-gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.project-gallery__grid a {
    grid-column: span 4;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7e7ea;
}

.project-gallery__grid a:nth-child(1),
.project-gallery__grid a:nth-child(5) {
    grid-column: span 8;
}

.project-gallery__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.project-gallery__grid a:hover img,
.project-gallery__grid a:focus img {
    transform: scale(1.03);
}

.service-faq__layout {
    display: grid;
    grid-template-columns: minmax(250px, .75fr) minmax(0, 1.4fr);
    gap: clamp(44px, 7vw, 100px);
}

.service-faq__list details {
    border-top: 1px solid #d5d6db;
}

.service-faq__list details:last-child {
    border-bottom: 1px solid #d5d6db;
}

.service-faq__list summary {
    position: relative;
    padding: 24px 42px 24px 0;
    color: #17191b;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
}

.service-faq__list summary::after {
    position: absolute;
    top: 50%;
    right: 8px;
    color: #842af9;
    content: '+';
    font-size: 28px;
    transform: translateY(-50%);
}

.service-faq__list details[open] summary::after {
    content: '−';
}

.service-faq__list details > div {
    padding: 0 40px 22px 0;
    color: #646970;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .work-hero {
        min-height: 450px;
    }

    .work-hero--compact {
        min-height: 340px;
    }

    .service-intro__grid,
    .project-comparison__layout,
    .service-faq__layout {
        grid-template-columns: 1fr;
    }

    .service-intro__heading,
    .project-comparison__copy {
        max-width: 720px;
    }

    .service-reasons__grid,
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-reason-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .work-page .container {
        width: min(100% - 30px, 1320px);
    }

    .work-hero,
    .work-hero--compact {
        min-height: 360px;
    }

    .work-hero::after {
        background: linear-gradient(90deg, rgba(15, 17, 20, .92), rgba(15, 17, 20, .5));
    }

    .work-hero__inner {
        padding-top: 76px;
        padding-bottom: 52px;
    }

    .work-hero h1 {
        font-size: clamp(50px, 15vw, 70px);
    }

    .work-section {
        padding: 64px 0;
    }

    .work-section-heading--split {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-reasons__grid,
    .project-grid,
    .project-grid--archive {
        grid-template-columns: 1fr;
    }

    .service-reason-card:last-child {
        grid-column: auto;
    }

    .service-reason-card {
        min-height: 0;
    }

    .service-reason-card__number {
        margin-bottom: 42px;
    }

    .project-filter {
        flex: 1 1 calc(50% - 10px);
    }

    .project-detail__cover {
        width: calc(100% - 30px);
        margin-top: -28px;
        aspect-ratio: 4 / 3;
    }

    .project-gallery__grid {
        grid-template-columns: 1fr;
    }

    .project-gallery__grid a,
    .project-gallery__grid a:nth-child(1),
    .project-gallery__grid a:nth-child(5) {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card__image img,
    .project-gallery__grid img {
        transition: none;
    }
}
