.finish-service-grid.home-process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.home-process-grid .finish-service-card {
    position: relative;
    min-width: 0;
    border: 1px solid #d5e2ee;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.home-process-grid .finish-service-card:is(:hover, :focus-within) {
    border-color: #83a9ca;
    box-shadow: 0 5px 18px rgb(21 57 87 / 8%);
}

.home-process-grid .home-process-card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.home-process-grid .finish-card-photo {
    margin: 0;
    padding: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5ebf1;
}

.home-process-grid .finish-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform .2s ease;
}

.home-process-card-link:hover img {
    transform: scale(1.035);
}

.home-process-grid .process-photo-caption {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 15px 16px 5px;
    gap: 0;
    overflow-wrap: anywhere;
}

.home-process-grid .process-photo-caption h3 {
    font-size: clamp(17px, 1.8vw, 21px);
    margin: 0 0 6px;
}

.home-process-grid .process-photo-caption p {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
}

.home-process-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-top: auto;
    border-top: 1px solid #dce6ee;
    color: #145b96;
    font-size: 13px;
    font-weight: 700;
}

.home-process-card-link:is(:hover, :focus-visible) .home-process-cta > span:first-child {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-process-grid .home-process-card-link:focus-visible {
    outline: 3px solid #1d488e;
    outline-offset: -3px;
}

.home-process-grid .home-process-video-link {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #173957;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

#home.studio-hero .home-workshop-background .home-workshop-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .75s ease;
}

#home.studio-hero .home-workshop-background .is-current {
    opacity: 1;
}

#home.studio-hero .home-workshop-background::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgb(12 29 46 / 85%), rgb(13 32 51 / 72%) 45%, rgb(16 33 50 / 30%) 73%, rgb(16 33 50 / 12%));
}

#home.studio-hero .home-workshop-background::after {
    z-index: 1;
    background: linear-gradient(to top, rgb(8 24 39 / 72%) 48px, transparent 96px);
}

/* Section navigation shared by the homepage and top-level hubs. */
#home.studio-hero:has(+ .home-section-nav) {
    padding-bottom: clamp(20px, 4vw, 48px);
}

.library-hero:has(+ .home-section-nav),
.chiheng-company-page #main > .unified-hub-hero:first-child {
    display: flex;
    align-items: center;
    min-height: calc(440px + clamp(20px, 4vw, 48px));
    padding-block: 24px;
}

@media (max-width: 760px) {
    .library-hero:has(+ .home-section-nav),
.chiheng-company-page #main > .unified-hub-hero:first-child {
        min-height: 330px;
        padding-block: 28px;
    }
}

.material-library :is(#material-machining, #material-enquiry),
.finishing-page :is(#finishing-products, #finishing-enquiry),
.company-page :is(#company-about, #company-quality, #company-enquiry) {
    scroll-margin-top: 120px;
}

.home-section-nav {
    background: #edf3f8;
    border-block: 1px solid #d7e3ef;
}

main > .home-section-nav ~ :is(#programs, #cap-processes, #materials, #finish-options, #company-about) {
    background: #fff;
}

.home-section-nav > .container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding-block: 14px;
}

@media (min-width: 601px) {
    .home-section-nav > .container:has(> a:nth-child(3):last-child) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.home-section-nav a {
    display: grid;
    place-items: center;
    min-height: 46px;
    padding: 6px;
    border: 1px solid #b6c9db;
    border-radius: 6px;
    background: #fff;
    color: #173f61;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    text-wrap: balance;
}

.home-section-nav a:hover,
.home-section-nav a:focus-visible {
    background: #edf4fb;
    color: #124d80;
}

.home-section-nav a:focus-visible {
    outline: 2px solid #1968aa;
    outline-offset: -2px;
}


@media (min-width: 761px) and (max-width: 1050px) {
    .home-section-nav > .container {
        box-sizing: border-box;
        padding-inline-end: 28px;
    }
}

@media (max-width: 600px) {
    .home-section-nav > .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section-nav a:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .finish-service-grid.home-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    #home.studio-hero .home-workshop-background::before {
        background: linear-gradient(90deg, rgb(12 29 46 / 85%), rgb(15 32 49 / 69%));
    }

}

@media (max-width: 500px) {
    .finish-service-grid.home-process-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-process-grid .finish-card-photo img,
    #home.studio-hero .home-workshop-background .home-workshop-slide {
        transition: none;
    }
}


/* Keep the full product compositions visible in the home banner. */
#home.studio-hero .home-workshop-background .home-workshop-slide:not(:first-child) {
    object-fit: contain;
    object-position: right center;
}

