.sez-production-gallery-page {
    --sez-pg-bg: #0e1115;
    --sez-pg-panel: #15191e;
    --sez-pg-line: rgba(255, 255, 255, .16);
    --sez-pg-tile-base: clamp(174px, 12vw, 330px);
    --sez-pg-zoom: 1;
    --sez-pg-tile: calc(var(--sez-pg-tile-base) * var(--sez-pg-zoom));
    --sez-pg-gap: clamp(5px, .42vw, 9px);
    height: 100svh;
    overflow: hidden;
    background: var(--sez-pg-bg);
    color: #fff;
}

.sez-production-gallery-page .sez-site-shell,
.sez-production-gallery-page .sez-main {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--sez-pg-bg);
}

.sez-production-gallery-page .sez-header,
.sez-production-gallery-page .sez-header.is-scrolled {
    box-shadow: none;
}

.sez-production-gallery-page :is(.szai-launcher, .szai-backdrop, .sez-quick-tools) {
    display: none !important;
}

.sez-production-gallery-page .sez-pg {
    position: fixed;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: var(--sez-pg-bg);
    color: #fff;
}

.sez-pg__stage,
.sez-pg__viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.sez-pg__stage {
    background: var(--sez-pg-bg);
    isolation: isolate;
}

.sez-pg__viewport {
    inset: calc(var(--sez-header-height) + var(--sez-utility-height)) 0 0;
    width: auto;
    height: auto;
    cursor: grab;
    touch-action: none;
    overscroll-behavior: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.sez-pg__viewport.is-dragging {
    cursor: grabbing;
}

.sez-pg__track {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: max-content;
    height: max-content;
    grid-template-columns: repeat(3, max-content);
    grid-template-rows: repeat(3, max-content);
    gap: var(--sez-pg-gap);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.sez-pg__group {
    display: grid;
    width: max-content;
    height: calc((var(--sez-pg-tile) * 3) + (var(--sez-pg-gap) * 5));
    grid-auto-columns: var(--sez-pg-tile);
    grid-auto-flow: column dense;
    grid-template-rows: repeat(6, calc(var(--sez-pg-tile) / 2));
    gap: var(--sez-pg-gap);
}

.sez-pg-card {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    outline: 0;
    appearance: none;
    background: var(--sez-pg-panel);
    color: #fff;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
    isolation: isolate;
}

.sez-pg-card:focus-visible {
    z-index: 3;
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.sez-pg-card--portrait-tall {
    grid-row: span 4;
}

.sez-pg-card--portrait {
    grid-row: span 3;
}

.sez-pg-card--square {
    grid-row: span 2;
}

.sez-pg-card--landscape {
    grid-column: span 2;
    grid-row: span 3;
}

.sez-pg-card--wide {
    grid-column: span 2;
    grid-row: span 2;
}

.sez-pg-card__media {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    background: var(--sez-pg-panel);
}

.sez-pg-card__media :is(img, video) {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transform: scale(1.002);
    transition: transform .55s cubic-bezier(.2, .7, .2, 1), filter .3s ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.sez-pg-card__copy,
.sez-pg-card__arrow,
.sez-pg-card__video-mark,
.sez-pg__hint,
.sez-pg__intro,
.sez-pg__summary,
.sez-pg__seo-copy {
    display: none;
}

@media (hover: hover) {
    .sez-pg-card:hover .sez-pg-card__media :is(img, video) {
        filter: brightness(1.07);
        transform: scale(1.025);
    }
}

.sez-pg__empty {
    width: 100%;
    height: 100svh;
    background: var(--sez-pg-bg);
}

.sez-pg-modal[hidden] {
    display: none;
}

.sez-pg-modal {
    position: fixed;
    z-index: 2600;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(14px, 2.4vw, 42px);
    overscroll-behavior: contain;
}

.sez-pg-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4, 6, 8, .92);
    cursor: pointer;
    backdrop-filter: none;
}

.sez-pg-modal__backdrop:focus,
.sez-pg-modal__backdrop:focus-visible {
    outline: 0;
    box-shadow: none;
}

.sez-pg-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1680px, 100%);
    height: min(900px, calc(100svh - 64px));
    overflow: visible;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "heading content"
        "media content";
    gap: clamp(28px, 4vw, 74px);
    border: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
}

.sez-pg-modal__heading {
    display: flex;
    min-width: 0;
    grid-area: heading;
    flex-direction: column;
    justify-content: flex-end;
    padding-right: 54px;
}

.sez-pg-modal__heading h2 {
    max-width: 980px;
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 2.25vw, 46px);
    line-height: 1.06;
}

.sez-pg-modal__close {
    position: absolute;
    z-index: 8;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .72);
    background: rgba(14, 17, 21, .78);
    color: #fff;
    cursor: pointer;
}

.sez-pg-modal__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: currentColor;
}

.sez-pg-modal__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sez-pg-modal__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sez-pg-modal__close:hover {
    border-color: var(--sez-accent, #ec5429);
    background: var(--sez-accent, #ec5429);
    color: #fff;
}

.sez-pg-modal__media {
    display: grid;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    border: 0;
    background: transparent;
    grid-area: media;
    touch-action: none;
}

.sez-pg-modal__media :is(img, video) {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.sez-pg-modal__content {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(8px, 1.2vw, 22px) 0;
    overflow-y: auto;
    grid-area: content;
    scrollbar-width: none;
}

.sez-pg-modal__content::-webkit-scrollbar,
.sez-pg-modal__thumbs::-webkit-scrollbar {
    display: none;
}

.sez-pg-modal__client-logo {
    display: grid;
    width: clamp(74px, 7vw, 118px);
    height: clamp(50px, 5.2vw, 86px);
    margin-bottom: clamp(20px, 2vw, 34px);
    place-items: center;
}

.sez-pg-modal__client-logo[hidden] {
    display: none;
}

.sez-pg-modal__client-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.sez-pg-modal__client {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sez-pg-modal__client[hidden] {
    display: none;
}

.sez-pg-modal__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: clamp(20px, 2.4vw, 38px) 0 0;
    border-bottom: 1px solid var(--sez-pg-line);
}

.sez-pg-modal__facts:empty {
    display: none;
}

.sez-pg-modal__facts span {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border-top: 1px solid var(--sez-pg-line);
}

.sez-pg-modal__facts span + span {
    padding-left: 18px;
    border-left: 1px solid var(--sez-pg-line);
}

.sez-pg-modal__facts small {
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sez-pg-modal__facts strong {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.sez-pg-modal__content > p {
    margin: clamp(20px, 2.2vw, 34px) 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.65;
}

.sez-pg-modal__thumbs {
    display: grid;
    grid-auto-columns: 70px;
    grid-auto-flow: column;
    gap: 7px;
    margin: 22px 0;
    padding-bottom: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sez-pg-modal__thumbs button {
    display: grid;
    width: 70px;
    height: 70px;
    padding: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    opacity: .56;
}

.sez-pg-modal__thumbs button.is-active {
    border-color: #fff;
    opacity: 1;
}

.sez-pg-modal__thumbs :is(img, video) {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sez-pg-modal__project-link {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--sez-pg-line);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: color .22s ease;
}

.sez-pg-modal__project-link:hover {
    color: var(--sez-accent, #ec5429);
}

.sez-pg-modal__project-arrow {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

body.sez-pg-modal-open {
    overflow: hidden;
}

@media (min-width: 2200px) {
    .sez-production-gallery-page {
        --sez-pg-tile-base: clamp(300px, 12vw, 480px);
        --sez-pg-gap: 11px;
    }
}

@media (max-width: 991px) {
    .sez-production-gallery-page {
        --sez-pg-tile-base: clamp(112px, 28vw, 190px);
        --sez-pg-gap: 5px;
    }

    .sez-pg__viewport {
        inset: var(--sez-header-height) 0 0;
    }

    .sez-pg__group {
        height: calc((var(--sez-pg-tile) * 4) + (var(--sez-pg-gap) * 7));
        grid-template-rows: repeat(8, calc(var(--sez-pg-tile) / 2));
    }

    .sez-pg-modal__dialog {
        width: min(760px, calc(100% - 20px));
        height: min(860px, calc(100svh - 20px));
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(180px, 45svh) minmax(0, 1fr);
        grid-template-areas:
            "heading"
            "media"
            "content";
        gap: 12px;
    }

    .sez-pg-modal__media {
        border: 0;
    }

    .sez-pg-modal__content {
        padding: 0 8px 8px;
    }

    .sez-pg-modal__heading {
        min-height: 0;
        padding: 0 54px 0 8px;
    }

    .sez-pg-modal__heading h2 {
        font-size: clamp(22px, 5.7vw, 33px);
    }

    .sez-pg-modal__client-logo {
        width: 66px;
        height: 48px;
        margin-bottom: 12px;
    }

    .sez-pg-modal__content > p {
        font-size: 12px;
    }

    .sez-pg-modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .sez-production-gallery-page {
        --sez-pg-tile-base: clamp(96px, 29vw, 132px);
    }

    .sez-pg-modal {
        padding: 8px;
    }

    .sez-pg-modal__dialog {
        width: calc(100% - 10px);
        height: calc(100svh - 16px);
        border: 0;
        grid-template-rows: auto minmax(150px, 38svh) minmax(0, 1fr);
        gap: 8px;
    }

    .sez-pg-modal__heading h2 {
        font-size: clamp(18px, 5.2vw, 24px);
    }

    .sez-pg-modal__client {
        margin-bottom: 5px;
        font-size: 8px;
    }

    .sez-pg-modal__media {
        padding-inline: 8px;
    }

    .sez-pg-modal__facts span {
        min-height: 58px;
    }

    .sez-pg-modal__thumbs {
        grid-auto-columns: 52px;
        margin: 12px 0;
    }

    .sez-pg-modal__thumbs button {
        width: 52px;
        height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sez-pg-card__media :is(img, video) {
        transition: none;
    }
}
