/* Shared project gallery: native links, existing project copy and imagery. */
.project-gallery {
    width: min(1400px, calc(100% - 80px));
    margin: 160px auto 120px;
    scroll-margin-top: 110px;
}

.project-scene {
    --project-accent: var(--site-accent);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 390px;
    scroll-margin-top: 110px;
    padding: 38px 0;
    border-top: 1px solid #42443e;
    color: #f4f4ef !important;
    text-decoration: none !important;
    cursor: pointer;
}

.project-scene:last-child { border-bottom: 1px solid #42443e; }

.project-scene__number {
    position: relative;
    z-index: 2;
    align-self: start;
    width: fit-content;
    padding-top: 5px;
    font-size: 12px;
    color: #b9bcb3;
}

.project-scene__number::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 10px 2px 0;
    background: var(--project-accent);
}

.project-scene__copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.project-scene__description {
    max-width: 42%;
    margin: 0 0 22px;
    color: #c4c6bf;
    font-size: 12px;
    line-height: 1.7;
}

.project-scene__title {
    margin: 0;
    max-width: 70%;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 5.6vw, 84px);
    font-weight: 500;
    letter-spacing: -.065em;
    line-height: .98;
    transition: color .3s ease, transform .45s ease;
}

.project-scene__link {
    display: inline-flex;
    gap: 18px;
    align-items: center;
    margin-top: 26px;
    color: #c4c6bf;
    font-size: 11px;
}

.project-scene__link::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--project-accent);
    transition: width .35s ease;
}

.project-scene__visual {
    position: absolute;
    inset: 22px 0 22px auto;
    z-index: 0;
    width: 62%;
    overflow: hidden;
    background: #191c19;
    clip-path: polygon(17% 0, 100% 0, 100% 100%, 0 100%);
    transition: clip-path .6s cubic-bezier(.2,.7,.2,1);
}

.project-scene__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0f0f0f 0%, rgba(15,15,15,.86) 16%, rgba(15,15,15,.22) 56%, rgba(15,15,15,.05)),
        linear-gradient(0deg, rgba(0,0,0,.25), transparent 45%);
}

.project-scene__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--project-position, center);
    filter: saturate(.7);
    transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}

.project-scene--canbus .project-scene__visual img {
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    padding: 12px 12px 12px 8%;
    background: #fff;
}

.project-scene__arrow {
    position: absolute;
    z-index: 2;
    top: 42px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid #ffffff80;
    border-radius: 50%;
    background: #0f0f0fb3;
    font-family: sans-serif;
    font-size: 26px;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.project-scene:focus-visible {
    outline: 2px solid var(--project-accent);
    outline-offset: 6px;
}

.project-scene:focus-visible .project-scene__title { color: var(--project-accent); }
.project-scene:focus-visible .project-scene__arrow { background: var(--project-accent); color: #0f0f0f; }

@media (hover: hover) {
    .project-scene:hover .project-scene__visual { clip-path: polygon(5% 0, 100% 0, 100% 100%, 0 100%); }
    .project-scene:hover .project-scene__visual img { transform: scale(1.045); filter: saturate(1); }
    .project-scene:hover .project-scene__title { color: var(--project-accent); transform: translateX(8px); }
    .project-scene:hover .project-scene__link::before { width: 48px; }
    .project-scene:hover .project-scene__arrow { background: var(--project-accent); color: #0f0f0f; transform: rotate(45deg); }
}

@media (max-width: 1000px) {
    .project-gallery { width: calc(100% - 40px); }
    .project-scene { grid-template-columns: 46px minmax(0, 1fr); min-height: 340px; }
    .project-scene__description { max-width: 48%; }
    .project-scene__title { font-size: clamp(44px, 6.3vw, 64px); }
}

@media (max-width: 600px) {
    .project-gallery { width: calc(100% - 20px); margin: 90px auto 70px; }
    .project-scene { grid-template-columns: 36px minmax(0, 1fr); padding: 22px 0 30px; min-height: 0; }
    .project-scene__number { grid-row: 1; grid-column: 1; padding-top: 0; font-size: 10px; }
    .project-scene__number::before { margin-right: 6px; width: 4px; height: 4px; }
    .project-scene__visual { position: relative; inset: auto; grid-row: 1; grid-column: 2; width: 100%; aspect-ratio: 1.65; clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%); }
    .project-scene__visual::after { background: linear-gradient(0deg, rgba(15,15,15,.5), transparent 60%); }
    .project-scene__visual img { filter: none; }
    .project-scene__copy { grid-column: 2; grid-row: 2; padding-top: 20px; }
    .project-scene__description { max-width: 100%; margin-bottom: 14px; font-size: 11px; }
    .project-scene__title { max-width: 100%; font-size: clamp(38px, 10.8vw, 62px); }
    .project-scene__link { margin-top: 20px; }
    .project-scene__arrow { top: 32px; right: 10px; width: 40px; height: 40px; font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .project-scene *, .project-scene *::before { transition: none !important; transform: none !important; }
}
