:root {
    --updates-blue: #5eafff;
    --updates-blue-dark: #328fe8;
    --updates-background: #212529;
    --updates-card: #20262c;
    --updates-text: #ffffff;
    --updates-muted: #b9c1ca;
    --updates-label: #99a4af;
    --updates-border: rgba(255, 255, 255, 0.1);
}



/* ===============================================
   updates banner
=============================================== */

.updates-banner {
    position: relative;
    isolation: isolate;

    display: flex;
    min-height: clamp(14rem, 24vw, 19rem);
    align-items: center;

    overflow: hidden;

    background-color: #161c2d;
    background-image: url("../images/updates/banner.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* Dark image treatment */

.updates-banner::before {
    position: absolute;
    inset: 0;
    z-index: -1;

    content: "";

    background:
            linear-gradient(
                    90deg,
                    rgba(16, 21, 31, 0.96) 0%,
                    rgba(16, 21, 31, 0.82) 36%,
                    rgba(16, 21, 31, 0.4) 68%,
                    rgba(16, 21, 31, 0.16) 100%
            ),
            linear-gradient(
                    180deg,
                    rgba(10, 14, 22, 0.34) 0%,
                    transparent 38%
            );
}


/* Fade the banner into the following section */

.updates-banner::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;

    height: 35%;

    content: "";
    pointer-events: none;

    background: linear-gradient(
            180deg,
            transparent 0%,
            rgba(33, 37, 41, 0.3) 50%,
            var(--updates-background) 100%
    );
}


/* Content positioning */

.updates-banner-container {
    position: relative;
    z-index: 1;

    width: 100%;
    padding-top: 5rem;
    padding-bottom: 2rem;
}

.updates-banner-content {
    max-width: 760px;
}


/* Blue accent */

.updates-banner-accent {
    display: block;

    width: 64px;
    height: 4px;
    margin-bottom: 1.4rem;

    background: var(--updates-blue);
    border-radius: 999px;

    animation: updates-banner-accent-in 650ms 100ms both ease-out;
}


/* Heading */

.updates-banner h1 {
    margin: 0;

    color: var(--updates-text);
    font-family: "Service-Vehicle", sans-serif;
    font-size: clamp(2.8rem, 6vw, 4.75rem);
    font-weight: bold;
    line-height: 1;
    letter-spacing: normal;

    text-shadow: 0 8px 35px rgba(0, 0, 0, 0.28);

    animation: updates-banner-title-in 700ms 180ms both ease-out;
}


/* Entrance animation */

@keyframes updates-banner-accent-in {
    from {
        opacity: 0;
        transform: translateY(14px) scaleX(0.4);
        transform-origin: left;
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleX(1);
        transform-origin: left;
    }
}

@keyframes updates-banner-title-in {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===============================================
   Responsive banner
=============================================== */

@media (max-width: 767.98px) {
    .updates-banner {
        min-height: 16rem;
        background-position: 62% center;
    }

    .updates-banner::before {
        background:
                linear-gradient(
                        90deg,
                        rgba(16, 21, 31, 0.9) 0%,
                        rgba(16, 21, 31, 0.65) 68%,
                        rgba(16, 21, 31, 0.35) 100%
                ),
                linear-gradient(
                        0deg,
                        var(--updates-background) 0%,
                        transparent 48%
                );
    }

    .updates-banner-container {
        display: flex;
        min-height: 16rem;
        align-items: flex-end;

        padding-top: 5.5rem;
        padding-bottom: 2.5rem;
    }

    .updates-banner h1 {
        font-size: clamp(2.7rem, 14vw, 4rem);
    }
}


/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .updates-banner-accent,
    .updates-banner h1 {
        animation: none;
    }
}


.updates-section {
    padding: clamp(1.5rem, 7vw, 3rem) 0;
    background:
            radial-gradient(
                    circle at 88% 20%,
                    rgba(94, 175, 255, 0.07),
                    transparent 28rem
            ),
            var(--updates-background);
}

/* ==================================================
   Update filters
================================================== */

.updates-filter {
    width: min(100%, 1160px);
    margin: 0 auto clamp(2.75rem, 6vw, 4.5rem);
    padding: clamp(1.35rem, 3vw, 2rem);
    background: linear-gradient(145deg, rgba(45, 51, 58, 0.98), rgba(34, 39, 45, 0.98));
    border: 1px solid var(--updates-border);
    border-radius: 1.35rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.updates-filter-heading {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.updates-filter-heading > div {
    min-width: 0;
}

.updates-filter-accent {
    display: block;
    width: 42px;
    height: 3px;
    margin-bottom: 0.8rem;
    background: var(--updates-blue);
    border-radius: 999px;
}

.updates-filter-heading h2 {
    margin: 0;
    color: var(--updates-text);
    font-family: "Service-Vehicle", sans-serif;
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: normal;
}

.updates-filter-heading > div > p {
    margin: 0.55rem 0 0;
    color: var(--updates-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.updates-filter-count {
    flex: 0 0 auto;
    margin: 0.35rem 0 0;
    color: var(--updates-blue);
    font-size: 0.88rem;
    font-weight: 750;
    text-align: right;
}

.updates-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
}

.updates-filter-field {
    display: grid;
    min-width: 0;
    gap: 0.5rem;
}

.updates-filter-field > span:first-child {
    color: #dce3ea;
    font-size: 0.8rem;
    font-weight: 750;
}

.updates-filter-search,
.updates-filter-sort-field {
    grid-column: span 2;
}

.updates-filter-control {
    position: relative;
    display: block;
    min-width: 0;
}

.updates-filter-control input,
.updates-filter-control select {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 0.9rem;
    color: var(--updates-text);
    color-scheme: dark;
    -webkit-text-fill-color: var(--updates-text);
    background-color: #181e24;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.8rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.updates-filter-control select {
    appearance: none;
    padding-right: 2.55rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 0.75rem 0.5rem;
}

.updates-filter-control select option {
    color: #fff;
    background: #181e24;
}

.updates-filter-control input::placeholder {
    color: #89949f;
    -webkit-text-fill-color: #89949f;
    opacity: 1;
}

.updates-filter-control input:focus,
.updates-filter-control select:focus {
    border-color: var(--updates-blue);
    box-shadow: 0 0 0 3px rgba(94, 175, 255, 0.14);
}

.updates-filter-control-search > i {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    z-index: 1;
    color: var(--updates-blue);
    font-size: 0.85rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.updates-filter-control-search input {
    padding-left: 2.65rem;
}

.updates-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.updates-filter-clear {
    display: inline-flex;
    gap: 0.55rem;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    color: #dceeff;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.updates-filter-clear:hover {
    color: #fff;
    background: rgba(94, 175, 255, 0.1);
    border-color: rgba(94, 175, 255, 0.35);
}

.updates-filter-clear:focus-visible {
    outline: 3px solid rgba(94, 175, 255, 0.35);
    outline-offset: 3px;
}

/* ==================================================
   Update article
================================================== */

.update-article {
    width: min(100%, 1160px);
    margin: 0 auto 3rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);

    color: var(--updates-text);
    background:
            linear-gradient(
                    145deg,
                    rgba(45, 51, 58, 0.98),
                    rgba(34, 39, 45, 0.98)
            );

    border: 1px solid var(--updates-border);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}


/* Main layout */

.update-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.update-content {
    min-width: 0;
}


/* Header */

.update-header {
    margin-bottom: 1.5rem;
}


/* Category */

.update-category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;

    color: #72bcff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.update-category::before {
    width: 32px;
    height: 3px;
    flex: 0 0 auto;
    content: "";

    background: var(--updates-blue);
    border-radius: 999px;
}


/* Title */

.update-title {
    margin: 0 0 0.25rem;

    color: var(--updates-text);
    font-family: "Service-Vehicle", sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.55rem);
    font-weight: 700;
    line-height: 1.08;

    /* Preserve the natural Service-Vehicle font spacing */
    letter-spacing: normal;
}


/* Vehicle link */

.update-vehicle {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-height: 38px;
    margin-top: 0.75rem;
    padding: 0.55rem 0.85rem;

    color: #dceeff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;

    background: rgba(94, 175, 255, 0.11);
    border: 1px solid rgba(94, 175, 255, 0.3);
    border-radius: 999px;

    transition:
            color 220ms ease,
            background-color 220ms ease,
            border-color 220ms ease;
}

.update-vehicle:hover {
    color: var(--updates-text);
    background: #3998ed;
    border-color: #3998ed;
}

.update-vehicle-arrow {
    font-size: 0.75rem;
    transition: transform 220ms ease;
}

.update-vehicle:hover .update-vehicle-arrow {
    transform: translateX(3px);
}


/* Article metadata */

.update-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    align-items: center;
    margin-top: 1.1rem;

    color: #9ba5af;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.4;
}

.update-meta span {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.update-meta i {
    color: var(--updates-blue);
}


/* ==================================================
   Body copy
================================================== */

.update-body p {
    margin: 0 0 1.25rem;
    color: var(--updates-muted);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
}

.update-body p:last-child {
    margin-bottom: 0;
}


/* Work highlights */

.update-highlights {
    margin-top: 1.75rem;
    padding: 1.2rem 1.3rem;
    background: rgba(94, 175, 255, 0.07);
    border: 1px solid rgba(94, 175, 255, 0.18);
    border-radius: 1rem;
}

.update-highlights h3 {
    margin: 0 0 0.85rem;
    color: var(--updates-text);
    font-size: 0.92rem;
    font-weight: 750;
}

.update-highlights ul {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.update-highlights li {
    position: relative;
    padding-left: 1.3rem;
    color: var(--updates-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.update-highlights li::before {
    position: absolute;
    top: 0.5rem;
    left: 0;
    width: 0.45rem;
    height: 0.45rem;
    content: "";
    background: var(--updates-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(94, 175, 255, 0.1);
}


/* Related project */

.update-project-link {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    color: var(--updates-text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: background-color 220ms ease, border-color 220ms ease;
}

.update-project-link span {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.update-project-link small {
    color: var(--updates-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.update-project-link > i {
    flex: 0 0 auto;
    color: var(--updates-blue);
    transition: transform 220ms ease;
}

.update-project-link:hover {
    color: var(--updates-text);
    background: rgba(94, 175, 255, 0.08);
    border-color: rgba(94, 175, 255, 0.3);
}

.update-project-link:hover > i {
    transform: translateX(4px);
}


/* ==================================================
   Image gallery
================================================== */

.update-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 1rem;
    min-width: 0;
    align-items: start;
    align-self: start;
}


/*
 * If the gallery contains an odd number of photographs,
 * make the first photograph full width.
 *
 * 1 image:  full width
 * 3 images: first full width, next two alongside
 * 5 images: first full width, remaining images in pairs
 */

.update-gallery:has(> .update-photo:last-child:nth-child(odd))
> .update-photo:first-child {
    grid-column: 1 / -1;
}


/* Image card */

.update-photo {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    align-self: start;

    background: var(--updates-card);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 1rem;
}

.update-photo > a {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #181d22;
}

.update-photo img {
    position: absolute;
    inset: 0;

    display: block;
    width: 100%;
    height: 100%;
    max-width: none;

    object-fit: cover;
    object-position: center;

    transition:
            filter 300ms ease,
            transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.update-photo > a:hover img {
    filter: brightness(1.06);
    transform: scale(1.025);
}

.update-photo figcaption {
    padding: 0.85rem 1rem 0.95rem;

    color: #aeb7c0;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.5;
}


/* Sharing */

.update-share {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.25rem;
    color: var(--updates-label);
    font-size: 0.82rem;
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-share-actions {
    position: relative;
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.update-share-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #dceeff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease;
}

.update-share-button:hover {
    color: var(--updates-text);
    background: var(--updates-blue-dark);
    border-color: var(--updates-blue);
}

.update-copy-status {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.55rem);
    width: max-content;
    min-height: 1em;
    color: var(--updates-blue);
    font-size: 0.75rem;
}


/* Keyboard focus */

.update-vehicle:focus-visible,
.update-project-link:focus-visible,
.update-share-button:focus-visible,
.update-photo > a:focus-visible {
    outline: 3px solid rgba(94, 175, 255, 0.8);
    outline-offset: 3px;
}


/* ==================================================
   Tablet
================================================== */

@media (max-width: 991.98px) {
    .updates-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .update-layout {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
        gap: 2rem;
    }

    .update-gallery {
        grid-template-columns: 1fr;
    }

    .update-photo {
        grid-column: auto;
    }
}


/* ==================================================
   Mobile
================================================== */

@media (max-width: 767.98px) {
    .updates-filter {
        padding: 1.3rem;
        border-radius: 1.15rem;
    }

    .updates-filter-heading {
        display: grid;
        gap: 0.75rem;
    }

    .updates-filter-count {
        margin: 0;
        text-align: left;
    }

    .updates-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .updates-filter-search,
    .updates-filter-sort-field {
        grid-column: auto;
    }

    .updates-filter-actions {
        justify-content: stretch;
    }

    .updates-filter-clear {
        width: 100%;
    }

    .update-article {
        margin-bottom: 2rem;
        padding: 1.4rem;
        border-radius: 1.15rem;
    }

    .update-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .update-title {
        font-size: clamp(1.8rem, 9vw, 2.3rem);
    }

    .update-gallery {
        grid-template-columns: 1fr;
    }

    .update-gallery:has(> .update-photo:last-child:nth-child(odd))
    > .update-photo:first-child {
        grid-column: auto;
    }

    .update-share {
        align-items: flex-start;
    }
}


/* ==================================================
   Reduced motion
================================================== */

@media (prefers-reduced-motion: reduce) {
    .update-photo img,
    .update-vehicle,
    .update-vehicle-arrow,
    .update-project-link,
    .update-project-link > i,
    .update-share-button {
        transition: none;
    }

    .update-photo > a:hover img,
    .update-vehicle:hover .update-vehicle-arrow,
    .update-project-link:hover > i {
        transform: none;
    }
}

.updates-year-group {
    scroll-margin-top: 110px;
}

.updates-year-group + .updates-year-group {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.updates-year-content {
    display: grid;
    gap: 2rem;
}

.updates-year-content .update-article {
    width: 100%;
    margin: 0;
}

.updates-year-heading {
    display: flex;
    width: 100%;
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    align-items: center;
    gap: 1rem;
}

.updates-year-heading h2 {
    flex-shrink: 0;
    margin: 0;
    color: var(--updates-text);
    font-family: "Service-Vehicle", sans-serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: bold;
    line-height: 1;
    letter-spacing: normal;
}

.updates-year-accent {
    flex-shrink: 0;
    width: 48px;
    height: 4px;
    background: var(--updates-blue);
    border-radius: 999px;
}

.updates-year-count {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.85rem;
    color: var(--updates-label);
    font: 600 0.9rem/1 "Figtree", sans-serif;
}

.updates-year-count::before {
    width: 1px;
    height: 1.25rem;
    content: "";
    background: rgba(255, 255, 255, 0.16);
}

.updates-year-line {
    flex: 1;
    min-width: 1rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent);
}

.updates-year-toggle {
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--updates-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.updates-year-toggle:hover,
.updates-year-toggle:focus-visible {
    color: var(--updates-text);
    background: var(--updates-blue-dark);
    border-color: var(--updates-blue);
}

.updates-year-toggle:focus-visible {
    outline: 3px solid rgba(94, 175, 255, 0.28);
    outline-offset: 3px;
}

.updates-year-chevron {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(2px) rotate(225deg);
    transition: transform 250ms ease;
}

.updates-year-toggle[aria-expanded="false"] .updates-year-chevron {
    transform: translateY(-2px) rotate(45deg);
}

.updates-year-content[hidden] {
    display: none !important;
}

.updates-empty {
    margin: 0;
    padding: 3rem 1rem;
    color: var(--updates-muted);
    text-align: center;
}

