/* ============================================================
   FILE: /assets/css/3d-visualisation.css
   STATUS: CHANGED

   Purpose:
   Positions the full-width hero video and future service artwork.
   Dividers, section labels, and spacing come from layout.css.
   Typography remains controlled by base.css.

   Future note:
   Replace the hero video source with an alpha-enabled export.
   Replace these labelled artwork areas with original renders.
   Keep product images within the same responsive composition.
   ============================================================ */

/* ============================================================
   Purpose: Give the Products image half of its desktop row.
   Future note: Keep artwork proportional when replacing the image;
   shared heading and paragraph typography stays in base.css.
   ============================================================ */

#products .service-detail__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-artwork {
    min-width: 0;
}

.product-artwork img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================================
   Purpose: Keep inactive slideshow images out of layout and view.
   Future note: Retain the explicit rule above the global img display.
   ============================================================ */

.product-artwork img[hidden],
#architecture .architecture-artwork[data-artwork-slideshow] img[hidden] {
    display: none;
}

/* ============================================================
   Purpose: Layer Architecture text over the full-width render.
   Future note: Keep the image uncropped and typography in base.css.
   ============================================================ */

#architecture {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    isolation: isolate;
}

#Arch-content_1 {
    grid-area: 2 / 1;
}

#architecture .service-detail__content {
    position: relative;
    z-index: 1;
    grid-area: 3 / 1;
    align-self: start;
    margin-top: 3rem;
    text-align: left;
}

#architecture .service-detail__content h2,
#architecture .service-detail__content > p {
    text-align: left;
}

#architecture .service-detail__content > p {
    max-width: none;
    margin-inline: 0;
}

#architecture .service-detail__list {
    display: flex;
    flex-wrap: wrap;
}

#architecture .architecture-artwork {
    position: relative;
    z-index: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
}

.Arch-content_2 {
    grid-area: 3 / 1;
    align-self: start;
}

#architecture .architecture-artwork img {
    display: block;
    width: 100%;
    height: auto;
}

.Arch-content_2 .architecture-artwork img {
    margin-top: 150px;
}

/* ============================================================
   Purpose: Reserve space for the exterior slideshow.
   Future note: Match the aspect ratio to the source renders.
   ============================================================ */

#architecture .architecture-artwork[data-artwork-slideshow] img,
.architecture-artwork__transition {
    aspect-ratio: 2560 / 1156;
    object-fit: contain;
}

.architecture-artwork__transition:not([hidden]) {
    display: block;
    width: 100%;
    height: auto;
}

.architecture-artwork__credit {
    position: absolute;
    z-index: 2;
    bottom: 50px;
    left: 50px;
    max-width: calc(100% - 100px);
    padding: 0.5rem 0.75rem;
    background-color: rgb(196 196 196 / 30%);
    color: #ffffff;
    overflow-wrap: anywhere;
}

/* ============================================================
   Purpose: Scroll full-width galleries with proportional images.
   Future note: Each duplicated sequence must match its original.
   ============================================================ */

.architecture-slideshow {
    position: relative;
    left: 50%;
    width: 100vw;
    overflow-x: auto;
    transform: translateX(-50%);
}

.architecture-slideshow[data-looping] {
    overflow: clip;
}

.architecture-slideshow__track,
.architecture-slideshow__sequence {
    display: flex;
}

.architecture-slideshow__track {
    width: max-content;
}

.architecture-slideshow__sequence {
    flex: none;
    align-items: flex-start;
}

.architecture-slideshow__sequence img {
    box-sizing: border-box;
    flex: none;
    width: calc(40vw - 10px);
    max-width: none;
    height: auto;
    margin: 10px 5px;
}

.Arch-content_2 .architecture-slideshow__sequence img {
    width: calc(30vw - 7.5px);
    margin: 7.5px 3.75px;
}

.architecture-slideshow__sequence[hidden] {
    display: none;
}

/* ============================================================
   Purpose: Align the project slideshows and soften their side edges.
   Future note: Keep the navigation buttons outside the masked panel.
   ============================================================ */

.architecture-projects {
    position: relative;
    width: 100%;
    container-type: inline-size;
    --architecture-edge-fade: min(8%, 5rem);
}

.architecture-projects__panel {
    mask-image: linear-gradient(to right, transparent, black var(--architecture-edge-fade), black calc(100% - var(--architecture-edge-fade)), transparent);
}

#architecture .architecture-projects .architecture-artwork,
.architecture-projects .architecture-slideshow {
    left: auto;
    width: 100%;
    transform: none;
}

.architecture-projects .architecture-slideshow {
    container-type: inline-size;
}

.architecture-projects .architecture-slideshow__sequence img {
    width: calc(40cqw - 10px);
}

.architecture-projects__arrow:not([hidden]) {
    position: absolute;
    top: 22.58cqw;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 5rem;
    height: 2.75rem;
    transform: translateY(-50%);
    border: 1px solid var(--color-purple-main);
    border-radius: var(--radius-pill);
    background: var(--color-grey-darkest);
    color: #c4c4c4;
    font-size: calc(1em - 0.2rem);
    white-space: nowrap;
    cursor: pointer;
}

.architecture-projects__arrow--previous {
    right: calc(100% + 0.25rem + 40px);
}

.architecture-projects__arrow--next {
    left: calc(100% + 0.25rem + 40px);
}

@media (width < calc(1520px + 10.5rem + 80px)) {
    .architecture-projects:has(.architecture-projects__arrow:not([hidden])) {
        padding-bottom: 3.25rem;
    }

    .architecture-projects__arrow:not([hidden]) {
        top: auto;
        bottom: 0;
        transform: none;
    }

    .architecture-projects__arrow--previous {
        right: auto;
        left: 0;
    }

    .architecture-projects__arrow--next {
        right: 0;
        left: auto;
    }
}

/* ============================================================
   Purpose: Centre the Architecture image rights notice.
   ============================================================ */

.architecture-rights {
    position: fixed;
    inset: 0;
    width: min(calc(32rem + 50px), calc(100% - 2rem));
    margin: auto;
    padding: 1rem 2.5rem;
    border: 3px solid var(--color-purple-main);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-grey-soft) 70%, transparent);
    color: var(--color-grey-darkest);
}

.architecture-rights[open] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.architecture-rights p {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: inherit;
}

.architecture-rights__close {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

@media (max-width: 900px) {
    #products .service-detail__row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ============================================================
   Purpose: Group the hero copy directly below the breadcrumbs.
   ============================================================ */

.visualisation-hero {
    position: relative;
    isolation: isolate;
    align-items: flex-start;
    min-height: 100svh;
}

.visualisation-hero .hero-section__inner {
    position: relative;
}

.visualisation-hero .hero-eyebrow {
    margin-bottom: 0.75rem;
}

.visualisation-hero .hero-section__bottom {
    margin-top: 1rem;
}

.visualisation-hero__video {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    display: block;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.visualisation-hero .button {
    position: relative;
    z-index: 3;
}

/* ============================================================
   Purpose: Keep mobile hero copy and video together without a full-height gap.
   Future note: Keep the desktop video framing unchanged.
   ============================================================ */

@media (max-width: 900px) {
    #products,
    #architecture,
    .service-page-work-link {
        padding-block: 50px;
    }

    .visualisation-hero {
        flex-direction: column;
        justify-content: flex-start;
        min-height: 0;
        gap: 0;
        padding-block: 0 50px;
    }

    .visualisation-hero .hero-section__bottom {
        align-items: center;
        gap: 0.75rem;
    }

    .visualisation-hero__video {
        position: relative;
        top: auto;
        flex-shrink: 0;
        max-width: 100vw;
        height: min(30svh, 18rem);
        margin-block: 0;
        object-fit: contain;
        object-position: center;
    }

    .visualisation-hero h1,
    .visualisation-hero p,
    #products h2,
    #products p,
    .service-page-work-link p {
        text-align: center;
    }

    .visualisation-hero .hero-section__text,
    .service-detail__content > p {
        margin-inline: auto;
    }
}

/* ============================================================
   Purpose: Alternating artwork areas beside overlapping headings
   ============================================================ */

.visualisation-placeholder {
    position: absolute;
    z-index: 2;
    left: 2%;
    top: 22%;
    display: grid;
    place-items: center;
    width: 42%;
    min-height: 55%;
    padding: 2rem;
    border: 1px dashed rgba(196, 196, 196, 0.2);
    background: rgba(121, 72, 135, 0.04);
    text-align: center;
}

.service-feature--left .visualisation-placeholder {
    left: auto;
    right: 2%;
}

.visualisation-placeholder p {
    margin: 0;
}

/* ============================================================
   Purpose: Stack artwork beneath section titles on small screens
   ============================================================ */

@media (max-width: 900px) {
    .visualisation-placeholder,
    .service-feature--left .visualisation-placeholder {
        top: auto;
        bottom: 2rem;
        left: 0;
        right: auto;
        width: 100%;
        min-height: 14rem;
    }
}
