:root {
    --projects-bg: #050a12;
    --projects-surface: #091321;
    --projects-surface-2: #0c192b;
    --projects-line: rgba(132, 181, 255, 0.16);
    --projects-blue: #6da8ff;
    --projects-text: #f4f7fc;
    --projects-muted: rgba(225, 234, 247, 0.68);
}

body.projects-page {
    margin-bottom: 0 !important;
    background: var(--projects-bg);
    color: var(--projects-text);
}

.projects-page main {
    overflow: hidden;
    background: var(--projects-bg);
}

@media (min-width: 1024px) {
    nav.navbar.validnavs.projects-navbar.no-background:not(.sticked) {
        position: absolute !important;
        top: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

.projects-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100svh;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #071222;
}

.projects-hero-media,
.projects-hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.projects-hero-media {
    z-index: -3;
    inset: -2%;
    background:
        linear-gradient(90deg, rgba(3, 9, 18, 0.98) 0%, rgba(5, 17, 34, 0.91) 48%, rgba(7, 19, 39, 0.48) 100%),
        url("../img/services/2.png") center / cover no-repeat;
    transform: scale(1.025);
}

.projects-hero::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 72% 40%, rgba(57, 126, 229, 0.22), transparent 31%),
        linear-gradient(180deg, rgba(3, 8, 16, 0.1), rgba(3, 8, 16, 0.72));
}

.projects-hero-grid {
    z-index: -1;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(113, 169, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(113, 169, 255, 0.12) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 90%);
    mask-image: linear-gradient(90deg, #000 0%, #000 58%, transparent 90%);
}

.projects-hero-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: clamp(48px, 8vw, 120px);
    align-items: end;
    padding-top: clamp(150px, 19vh, 210px);
    padding-bottom: clamp(110px, 14vh, 150px);
}

.projects-hero-copy {
    max-width: 940px;
}

.projects-eyebrow,
.projects-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    color: #8dbaff;
    font-family: var(--font-heading);
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.projects-eyebrow::before,
.projects-section-label::before {
    width: 34px;
    height: 2px;
    content: "";
    background: currentColor;
}

.projects-hero h1 {
    max-width: 15ch;
    margin: 0;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(52px, 6vw, 86px) !important;
    font-weight: 750 !important;
    line-height: 0.98 !important;
    letter-spacing: -0.05em !important;
    text-wrap: balance;
}

.projects-hero h1 span {
    color: var(--projects-blue);
}

.projects-hero-lead {
    max-width: 780px;
    margin: 28px 0 0;
    color: var(--projects-muted);
    font-size: clamp(16px, 1.2vw, 19px) !important;
    line-height: 1.7 !important;
}

.projects-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    align-items: center;
    margin-top: 34px;
}

.projects-primary-cta,
.projects-text-link {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #fff !important;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.projects-primary-cta {
    min-width: 226px;
    padding: 0 22px;
    border: 1px solid rgba(117, 174, 255, 0.62);
    background: rgba(22, 62, 119, 0.55);
    transition: background 220ms ease, border-color 220ms ease;
}

.projects-primary-cta:hover,
.projects-primary-cta:focus-visible {
    border-color: #a4c9ff;
    background: rgba(46, 107, 199, 0.82);
}

.projects-text-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
}

.projects-hero-rail {
    display: grid;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.projects-hero-rail div {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.projects-hero-rail span {
    color: #76adff;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.projects-hero-rail strong {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.projects-scroll-cue {
    position: absolute;
    z-index: 3;
    bottom: 26px;
    left: 50%;
    display: inline-flex;
    gap: 13px;
    align-items: center;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.projects-intro {
    position: relative;
    padding: clamp(90px, 11vw, 155px) 0;
    color: var(--projects-text);
    border-top: 1px solid var(--projects-line);
    background: #070e18;
}

.projects-intro::after {
    position: absolute;
    right: -180px;
    bottom: -230px;
    width: 520px;
    height: 520px;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 107, 199, 0.16), transparent 68%);
    pointer-events: none;
}

.projects-intro-grid {
    display: grid;
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.7fr);
    gap: clamp(42px, 8vw, 125px);
}

.projects-intro h2,
.projects-heading-row h2,
.projects-delivery h2,
.projects-cta h2 {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(40px, 5vw, 70px) !important;
    font-weight: 700 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.04em !important;
    text-wrap: balance;
}

.projects-intro-grid > div > p {
    max-width: 760px;
    margin: 28px 0 0;
    color: var(--projects-muted);
    font-size: 18px !important;
    line-height: 1.72 !important;
}

.projects-portfolio {
    padding: clamp(90px, 10vw, 140px) 0;
    color: var(--projects-text);
    background:
        linear-gradient(rgba(101, 156, 237, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(101, 156, 237, 0.035) 1px, transparent 1px),
        var(--projects-bg);
    background-size: 64px 64px;
}

.projects-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 450px);
    gap: 50px;
    align-items: end;
    margin-bottom: 46px;
}

.projects-heading-note {
    margin: 0 0 6px;
    color: var(--projects-muted);
    font-size: 16px !important;
    line-height: 1.65 !important;
}

.projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.projects-filter button {
    min-height: 44px;
    padding: 0 16px;
    color: rgba(235, 242, 252, 0.63);
    border: 1px solid rgba(124, 174, 249, 0.18);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-heading) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    touch-action: manipulation;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.projects-filter button:hover,
.projects-filter button:focus-visible,
.projects-filter button.is-active {
    color: #fff;
    border-color: rgba(109, 168, 255, 0.72);
    background: rgba(56, 118, 213, 0.24);
}

.projects-filter button:focus-visible,
.project-card a:focus-visible,
.projects-primary-cta:focus-visible,
.projects-text-link:focus-visible,
.projects-cta a:focus-visible {
    outline: 3px solid rgba(142, 190, 255, 0.88);
    outline-offset: 3px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 320px;
    gap: 16px;
}

.project-card {
    position: relative;
    grid-column: span 4;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--projects-line);
    background: var(--projects-surface);
}

.project-card-featured {
    grid-column: span 8;
    grid-row: span 2;
}

.project-card-wide {
    grid-column: span 8;
}

.project-card.is-filtered-out {
    display: none;
}

.project-card a {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    color: #fff !important;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.78) contrast(1.06);
    transform: scale(1.015);
    transition: transform 650ms cubic-bezier(0.2, 0.72, 0.2, 1), filter 400ms ease;
}

.project-card-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 7, 14, 0.16) 26%, rgba(2, 8, 18, 0.92) 100%),
        linear-gradient(115deg, rgba(9, 39, 82, 0.18), rgba(10, 38, 75, 0.02));
    transition: background 300ms ease;
}

.project-card-top {
    position: absolute;
    top: 20px;
    right: 20px;
    left: 20px;
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-card-top span:first-child {
    color: #87b8ff;
}

.project-card-copy {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
}

.project-card-copy p {
    margin: 0 0 7px;
    color: #82b4ff;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
}

.project-card-copy h3 {
    max-width: 15ch;
    margin: 0;
    color: #fff;
    font-size: clamp(25px, 2.4vw, 38px) !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em !important;
}

.project-card-link {
    display: inline-flex;
    max-height: 0;
    align-items: center;
    gap: 13px;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transform: translateY(8px);
    transition: opacity 240ms ease, transform 240ms ease, max-height 240ms ease, margin 240ms ease;
}

.project-card:hover img,
.project-card a:focus-visible img {
    filter: saturate(1) contrast(1.05);
    transform: scale(1.075);
}

.project-card:hover .project-card-link,
.project-card a:focus-visible .project-card-link {
    max-height: 30px;
    margin-top: 15px;
    opacity: 1;
    transform: translateY(0);
}

.projects-empty {
    margin: 45px 0 0;
    color: var(--projects-muted);
    text-align: center;
}

.projects-delivery {
    position: relative;
    isolation: isolate;
    padding: clamp(100px, 12vw, 170px) 0;
    overflow: hidden;
    color: #fff;
    background: #08111f;
}

.projects-delivery-media {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: 0.22;
    background: url("../img/services/15.png") center / cover no-repeat;
}

.projects-delivery::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(4, 10, 19, 0.98), rgba(6, 18, 35, 0.9));
}

.projects-delivery-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
    gap: clamp(60px, 9vw, 130px);
    align-items: start;
}

.projects-delivery-grid > div > p:last-child {
    max-width: 630px;
    margin: 27px 0 0;
    color: var(--projects-muted);
    font-size: 17px !important;
    line-height: 1.7 !important;
}

.projects-phases {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.projects-phases li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 18px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.projects-phases li > span {
    color: var(--projects-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.projects-phases strong {
    display: block;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 650;
}

.projects-phases p {
    margin: 5px 0 0;
    color: var(--projects-muted);
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.projects-cta {
    padding: clamp(95px, 12vw, 170px) 0;
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(57, 124, 225, 0.19), transparent 35%),
        #050a12;
}

.projects-cta-inner {
    position: relative;
    padding: clamp(45px, 7vw, 85px);
    border: 1px solid rgba(128, 178, 255, 0.22);
    background:
        linear-gradient(rgba(109, 168, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 168, 255, 0.045) 1px, transparent 1px),
        #091525;
    background-size: 46px 46px;
}

.projects-cta h2 span {
    color: var(--projects-blue);
}

.projects-cta a {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    gap: 24px;
    margin-top: 34px;
    padding: 0 23px;
    color: #fff !important;
    border: 1px solid rgba(125, 179, 255, 0.65);
    background: rgba(46, 105, 195, 0.3);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-project-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 650ms ease, transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-project-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 991px) {
    .projects-hero-shell {
        grid-template-columns: 1fr;
        align-items: center;
        padding-top: 150px;
        padding-bottom: 110px;
    }

    .projects-hero-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .projects-hero-rail div {
        grid-template-columns: 1fr;
        padding: 15px;
        border-right: 1px solid rgba(255, 255, 255, 0.16);
    }

    .projects-intro-grid,
    .projects-delivery-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .projects-heading-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-card {
        grid-column: span 6;
    }

    .project-card-featured,
    .project-card-wide {
        grid-column: span 12;
        grid-row: span 1;
    }
}

@media (max-width: 767px) {
    .projects-hero {
        min-height: auto;
    }

    .projects-hero-media {
        background:
            linear-gradient(180deg, rgba(3, 9, 18, 0.72), rgba(3, 9, 18, 0.98) 78%),
            url("../img/services/2.png") center / cover no-repeat;
    }

    .projects-hero-shell {
        gap: 48px;
        padding-top: 132px;
        padding-bottom: 94px;
    }

    .projects-hero h1 {
        max-width: 100%;
        font-size: clamp(42px, 12.5vw, 60px) !important;
    }

    .projects-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .projects-primary-cta,
    .projects-text-link {
        width: 100%;
    }

    .projects-text-link {
        justify-content: space-between;
        padding: 0 4px;
    }

    .projects-hero-rail {
        grid-template-columns: 1fr;
    }

    .projects-hero-rail div {
        grid-template-columns: 38px 1fr;
        padding: 0;
        border-right: 0;
    }

    .projects-scroll-cue {
        display: none;
    }

    .projects-intro-grid > div > p {
        font-size: 16px !important;
    }

    .projects-filter {
        flex-wrap: nowrap;
        margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
        padding-right: 18px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .projects-filter::-webkit-scrollbar {
        display: none;
    }

    .projects-filter button {
        flex: 0 0 auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 310px;
    }

    .project-card,
    .project-card-featured,
    .project-card-wide {
        grid-column: 1;
        grid-row: span 1;
    }

    .project-card-link {
        max-height: 30px;
        margin-top: 13px;
        opacity: 1;
        transform: none;
    }

    .projects-delivery-grid {
        grid-template-columns: 1fr;
    }

    .projects-cta-inner {
        padding: 38px 24px;
    }
}

@media (max-width: 420px) {
    .projects-grid {
        grid-auto-rows: 285px;
    }

    .project-card-copy {
        right: 18px;
        bottom: 18px;
        left: 18px;
    }

    .project-card-copy h3 {
        font-size: 27px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-project-reveal],
    .project-card img,
    .project-card-link {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
