/* ========== GALLERY STYLES ========== */
.gallery-page {
    padding: 80px 0 clamp(50px, 5vw, 68px);
    background: linear-gradient(180deg, var(--theme-bg) 0%, var(--theme-bg-deep) 48%, var(--theme-bg-soft) 100%);
    min-height: 100vh;
}

.gallery-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 40px;
}

.gallery-header > h1 {
    color: var(--theme-text-strong);
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 4.4vw, 3.9rem);
    margin-bottom: 15px;
    line-height: 0.96;
    letter-spacing: -0.025em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-text-strong) 0%, var(--theme-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-header > .subtitle {
    color: var(--theme-text-muted);
    font-size: 1rem;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.68;
}

/* Фильтры */
.gallery-filter-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0 20px;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--theme-surface-gradient);
    border: 1px solid var(--theme-border);
    border-radius: 50px;
    color: var(--theme-text);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--theme-shadow-soft);
}

.filter-btn:hover {
    border-color: var(--theme-border-strong);
    color: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
    border-color: transparent;
    color: white;
}

.filter-btn i {
    flex: 0 0 1.1em;
    width: 1.1em;
    min-width: 1.1em;
    font-size: 1.1em;
    text-align: center;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.gallery-empty {
    grid-column: 1 / -1;
    background: var(--theme-surface-gradient);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-md);
    padding: 28px;
    text-align: center;
    color: var(--theme-text-muted);
    box-shadow: var(--theme-shadow-soft);
}

.gallery-empty h3 {
    margin: 0 0 8px;
    color: var(--theme-text-strong);
    font-size: 1.3rem;
}

.gallery-empty p {
    margin: 0;
}

.gallery-more {
    text-align: center;
    margin-top: 30px;
}

.gallery-show-more {
    min-width: 220px;
    display: none;
}

.gallery-item {
    background: var(--theme-surface-gradient);
    border-radius: var(--theme-radius-lg);
    overflow: hidden;
    box-shadow: var(--theme-shadow);
    transition: all 0.4s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

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

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--theme-shadow-strong);
}

.gallery-item.highlight {
    border: 3px solid var(--theme-accent);
    box-shadow: 0 18px 38px rgba(23, 121, 149, 0.16);
}

.gallery-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.gallery-image picture {
    display: block;
    height: 100%;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-image {
    height: 260px;
}

.work-info {
    padding: 20px 22px 24px;
}

.work-title {
    font-size: 1.15rem;
    margin-bottom: 0;
}







.work-info {
    padding: 25px;
}

.work-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--theme-surface-gradient-soft);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--theme-accent);
    margin-bottom: 15px;
}

.work-title {
    color: var(--theme-text-strong);
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

/* CTA */
.order-cta {
    text-align: center;
    margin-top: 50px;
}

.order-cta .btn + .btn {
    margin-left: 20px;
}



@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 60px 0;
    }

    .gallery-header > h1 {
        font-size: 2.2rem;
    }

    .gallery-filter-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        max-width: 460px;
        margin: 0 auto 32px;
        padding: 0 14px;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 12px;
        font-size: 0.92rem;
        border-radius: 16px;
        gap: 7px;
    }

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

    .order-cta .btn {
        width: 100%;
        margin-bottom: 15px;
        margin-left: 0;
    }

    .order-cta .btn + .btn {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .gallery-header > h1 {
        font-size: 1.8rem;
    }

    .gallery-filter-list {
        gap: 8px;
        padding: 0 10px;
    }

    .filter-btn {
        font-size: 0.88rem;
        padding: 10px 8px;
    }

    .gallery-image {
        height: 220px;
    }
}

/* ========== 2026 VISUAL POLISH ========== */
.gallery-page {
    padding: 92px 0 110px;
    background:
    radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(var(--theme-accent-strong-rgb), 0.08), transparent 18%),
    linear-gradient(180deg, var(--theme-bg) 0%, var(--theme-bg-deep) 46%, var(--theme-bg-soft) 100%);
}

.gallery-header {
    max-width: 820px;
    margin: 0 auto 56px;
}

.gallery-header > h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: var(--theme-text-strong);
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
    background-clip: initial;
}

.gallery-header > .subtitle {
    color: var(--theme-text-muted);
    font-size: 1.08rem;
    line-height: 1.8;
    max-width: 760px;
}

.gallery-filter-list {
    gap: 12px;
    margin-bottom: 46px;
}

.filter-btn {
    border-width: 1px;
    border-color: rgba(var(--theme-accent-rgb), 0.12);
    background: var(--theme-surface-gradient);
    box-shadow: var(--theme-shadow-soft);
    color: var(--theme-text);
    font-weight: 700;
}

.filter-btn:hover {
    border-color: var(--theme-border-strong);
    box-shadow: var(--theme-shadow);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
    border-color: transparent;
    box-shadow: 0 18px 30px rgba(23, 121, 149, 0.18);
}

.gallery-grid {
    gap: 24px;
}

.gallery-item {
    border-radius: var(--theme-radius-xl);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
    background: var(--theme-surface-gradient);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 28px 46px rgba(15, 23, 42, 0.12);
}

.gallery-image {
    height: 274px;
}


.work-info {
    padding: 22px 22px 24px;
}

.work-category {
    background: rgba(248, 243, 235, 0.95);
    border: 1px solid rgba(20, 56, 89, 0.08);
    color: #587086;
}

.work-title {
    font-size: 1.5rem;
}

.gallery-empty {
    border-radius: 28px;
    border: 1px solid rgba(20, 56, 89, 0.08);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 72px 0 86px;
    }

    .gallery-header {
        margin-bottom: 42px;
    }

    .gallery-header > h1 {
        font-size: clamp(2.5rem, 11vw, 3.5rem);
    }
}

/* Unified cool palette overrides */
.gallery-header > h1 {
    background: none;
    color: #2b231c;
    -webkit-text-fill-color: currentColor;
}

.filter-btn:hover {
    box-shadow: 0 6px 20px rgba(154, 108, 31, 0.12);
}

@media (min-width: 1101px) {
    .gallery-page {
        padding: 112px 0 108px;
    }

    .gallery-page > .container {
        width: min(1328px, calc(100vw - 92px));
        max-width: none;
    }

    .gallery-header {
        max-width: 980px;
        margin: 0 auto 40px;
    }

    .gallery-header > h1 {
        display: inline-flex;
        align-items: flex-end;
        justify-content: center;
        gap: 16px;
        font-size: clamp(2.8rem, 4.6vw, 4.25rem);
        line-height: 0.96;
    }

    .gallery-header > h1 i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        border-radius: 22px;
        background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
        color: #ffffff;
        font-size: 1.75rem;
        box-shadow: 0 18px 34px rgba(23, 121, 149, 0.18);
        transform: translateY(-3px);
        flex: 0 0 auto;
    }

    .gallery-header > .subtitle {
        max-width: 860px;
        margin: 0 auto;
        color: #687b8f;
        font-size: 1.03rem;
        line-height: 1.76;
    }

    .gallery-filter-list {
        max-width: 1080px;
        margin: 0 auto 36px;
        gap: 10px;
        padding: 0;
    }

    .filter-btn {
        padding: 11px 20px;
        min-height: 46px;
        border-radius: 999px;
        font-size: 0.96rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
        padding: 0;
    }

    .gallery-item {
        border-radius: 28px;
    }

    .gallery-image {
        height: 286px;
        cursor: zoom-in;
    }

    .zoom-btn {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        padding: 18px;
        text-decoration: none;
        z-index: 3;
    }

    .zoom-btn::before {
        content: "Открыть";
        position: absolute;
        left: 18px;
        bottom: 18px;
        display: inline-flex;
        align-items: center;
        padding: 9px 13px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #ffffff;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        opacity: 0.74;
        transform: translateY(0);
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    .zoom-btn i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #ffffff;
        font-size: 1.15rem;
        opacity: 0.88;
        transform: translateY(0);
        transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
        backdrop-filter: blur(10px);
    }

    .gallery-item:hover .zoom-btn::before,
    .gallery-item:focus-within .zoom-btn::before,
    .gallery-item:hover .zoom-btn i,
    .gallery-item:focus-within .zoom-btn i {
        opacity: 1;
        transform: translateY(0);
    }

    .gallery-item:hover .zoom-btn i,
    .gallery-item:focus-within .zoom-btn i {
        background: rgba(255, 255, 255, 0.24);
    }

    .work-info {
        padding: 20px 20px 22px;
    }

    .work-category {
        margin-bottom: 12px;
    }

    .work-title {
        font-size: 1.2rem;
        margin-bottom: 0;
    }
}

/* Editorial desktop redesign */
@media (min-width: 1101px) {
    .gallery-page {
        padding: 126px 0 122px;
    }

    .gallery-page > .container {
        width: min(1520px, calc(100vw - 72px));
    }

    .gallery-header {
        max-width: 980px;
        margin: 0 0 34px;
        text-align: left;
    }

    .gallery-header > h1 {
        justify-content: flex-start;
        align-items: baseline;
        margin-bottom: 20px;
        font-size: clamp(3rem, 4.4vw, 4.6rem);
    }

    .gallery-header > h1 i {
        width: 58px;
        height: 58px;
        border-radius: 20px;
        transform: translateY(-0.08em);
        background: linear-gradient(135deg, #294965 0%, #1f394f 100%);
        box-shadow: 0 20px 34px rgba(31, 57, 79, 0.18);
    }

    .gallery-header > .subtitle {
        max-width: 820px;
        margin: 0;
        font-size: 1.06rem;
        line-height: 1.8;
    }

    .gallery-filter-list {
        max-width: none;
        justify-content: flex-start;
        margin: 0 0 34px;
        gap: 12px;
        padding: 18px 22px;
        border-radius: 30px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 241, 235, 0.96));
        border: 1px solid var(--theme-border);
        box-shadow: 0 22px 42px rgba(20, 28, 39, 0.06);
    }

    .filter-btn {
        min-height: 46px;
        padding: 11px 20px;
        background: rgba(255, 255, 255, 0.92);
        color: #3a4b5c;
        border-color: var(--theme-border);
        box-shadow: 0 10px 18px rgba(20, 28, 39, 0.04);
    }

    .filter-btn:hover {
        color: #294965;
        border-color: rgba(41, 73, 101, 0.14);
        box-shadow: 0 16px 26px rgba(20, 28, 39, 0.06);
    }

    .filter-btn.active {
        background: linear-gradient(135deg, #294965 0%, #1f394f 100%);
        box-shadow: 0 18px 28px rgba(31, 57, 79, 0.18);
    }

    .gallery-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 24px;
    }

    .gallery-item {
        grid-column: span 4;
        border-radius: 30px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 236, 0.96));
        border: 1px solid var(--theme-border);
        box-shadow: 0 24px 44px rgba(20, 28, 39, 0.07);
    }

    .gallery-item:nth-child(7n + 1) {
        grid-column: span 7;
    }

    .gallery-item:nth-child(7n + 2),
    .gallery-item:nth-child(7n + 5) {
        grid-column: span 5;
    }

    .gallery-item:nth-child(7n + 1) .gallery-image {
        height: 392px;
    }

    .gallery-item:nth-child(7n + 2) .gallery-image,
    .gallery-item:nth-child(7n + 5) .gallery-image {
        height: 338px;
    }

    .gallery-image {
        height: 286px;
    }

    .zoom-btn {
        padding: 0;
    }

    .zoom-btn::before {
        content: "";
        left: auto;
        bottom: auto;
        top: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.94);
        border: none;
        opacity: 0.9;
        box-shadow: 0 18px 30px rgba(20, 28, 39, 0.18);
    }

    .zoom-btn i {
        position: absolute;
        top: 46px;
        right: 46px;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        border: 0;
        color: #294965;
        font-size: 1rem;
        opacity: 1;
        transform: translate(50%, -50%);
        backdrop-filter: none;
    }

    .gallery-item:hover .zoom-btn::before,
    .gallery-item:focus-within .zoom-btn::before {
        background: #ffffff;
        transform: translateY(-1px);
    }

    .gallery-item:hover .zoom-btn i,
    .gallery-item:focus-within .zoom-btn i {
        background: transparent;
        transform: translate(50%, -50%) scale(1.05);
    }

    .work-info {
        padding: 24px 24px 26px;
    }

    .work-category {
        margin-bottom: 16px;
        padding: 8px 14px;
        color: #294965;
        font-weight: 760;
    }

    .work-title {
        font-family: var(--font-display);
        font-size: 2rem;
        line-height: 0.98;
        letter-spacing: -0.02em;
    }
}

/* ========== DESKTOP FINAL PASS ========== */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    .gallery-page {
        background:
            radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.08), transparent 24%),
            radial-gradient(circle at 90% 5%, rgba(var(--theme-accent-strong-rgb), 0.06), transparent 18%),
            linear-gradient(180deg, var(--theme-bg) 0%, var(--theme-bg-deep) 46%, var(--theme-bg-soft) 100%);
    }

    .gallery-page > .container {
        width: min(1560px, calc(100vw - 68px));
    }

    .gallery-header {
        max-width: 1080px;
        margin-bottom: 38px;
    }

    .gallery-header > h1 i {
        background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
    }

    .gallery-filter-list,
    .gallery-item,
    .gallery-empty {
        border-color: var(--theme-border);
    }

    .filter-btn {
        color: var(--theme-text);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 247, 0.94));
    }

    .filter-btn:hover {
        color: var(--theme-accent);
        border-color: var(--theme-border-strong);
    }

    .filter-btn.active {
        background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
    }

    .gallery-item {
        box-shadow: var(--theme-shadow);
    }

    .work-category {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 247, 0.95));
        border: 1px solid var(--theme-border);
        box-shadow: var(--theme-shadow-soft);
    }
}

/* ========== 2026 GALLERY PRODUCTION CLEANUP ========== */
.gallery-page {
    padding: 104px 0 94px;
    background:
        radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.07), transparent 24%),
        radial-gradient(circle at 92% 4%, rgba(var(--theme-accent-strong-rgb), 0.09), transparent 18%),
        linear-gradient(180deg, var(--theme-bg) 0%, var(--theme-bg-deep) 48%, var(--theme-bg-soft) 100%);
}

.gallery-page > .container {
    width: min(1640px, calc(100vw - 64px));
}

.gallery-header {
    display: grid;
    justify-items: start;
    gap: 20px;
    max-width: 1220px;
    margin: 0 0 12px;
    text-align: left;
}

.gallery-eyebrow,
.order-cta__proof-label {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: rgba(var(--theme-text-rgb), 0.56);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-eyebrow i {
    color: var(--theme-accent);
}

.gallery-header > h1 {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-family: var(--font-display);
    font-size: var(--type-display-page);
    line-height: var(--leading-display);
    letter-spacing: -0.04em;
    color: var(--theme-text-strong);
}

.gallery-header > h1 i {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(41, 73, 101, 0.1), rgba(41, 73, 101, 0.02));
    color: var(--theme-accent);
    font-size: 1.6rem;
}

.gallery-header > .subtitle {
    max-width: 74ch;
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-body-lg);
    line-height: var(--leading-body);
    text-wrap: pretty;
}

body#top .gallery-page .gallery-filter-shell {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(11.6rem, 0.58fr) minmax(0, 1.42fr);
    align-items: center;
    gap: 14px;
    margin: 0 0 38px;
    padding: 14px 14px 16px;
    border-radius: 30px;
    border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.12);
    background:
        radial-gradient(circle at 0% 0%, rgba(var(--theme-accent-rgb), 0.09), transparent 28%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.99), rgba(246, 240, 231, 0.95) 56%, rgba(239, 232, 222, 0.92));
    box-shadow: 0 22px 42px rgba(var(--theme-text-strong-rgb), 0.08);
}

body#top .gallery-page .gallery-filter-shell::before,
body#top .gallery-page .gallery-filter-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

body#top .gallery-page .gallery-filter-shell::before {
    inset: -92px auto auto -56px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-accent-rgb), 0.14), rgba(255, 255, 255, 0));
}

body#top .gallery-page .gallery-filter-shell::after {
    right: -96px;
    bottom: -118px;
    width: 300px;
    height: 240px;
    background: radial-gradient(circle, rgba(var(--theme-accent-strong-rgb), 0.1), rgba(255, 255, 255, 0));
}

body#top .gallery-page .gallery-filter-shell > * {
    position: relative;
    z-index: 1;
}

body#top .gallery-page .gallery-filter-intro {
    display: grid;
    gap: 4px;
    max-width: 36rem;
    position: relative;
    z-index: 1;
    align-content: start;
    margin: 0;
}

body#top .gallery-page .gallery-filter-intro__title {
    margin: 0;
    max-width: 16ch;
    color: rgba(10, 24, 40, 0.99) !important;
    font-family: var(--font-display);
    font-size: clamp(1.72rem, 1.58rem + 0.34vw, 2.08rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
    white-space: normal;
    text-wrap: balance;
}

body#top .gallery-page .gallery-filter-intro__copy {
    margin: 0;
    max-width: 34ch;
    color: rgba(72, 89, 106, 0.9) !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.38;
    white-space: normal;
    text-wrap: pretty;
}

body#top .gallery-page .gallery-filter-body {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

body#top .gallery-page .gallery-filter-hint {
    display: none;
}

body#top .gallery-page .gallery-filter-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
    align-content: start;
    position: relative;
    z-index: 1;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0;
}

.filter-btn {
    min-height: 46px;
    padding: 10px 17px;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-gradient);
    box-shadow: var(--theme-shadow-soft);
    color: var(--theme-text);
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
    color: var(--theme-accent);
    border-color: var(--theme-border-strong);
    box-shadow: var(--theme-shadow);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 18px 30px rgba(var(--theme-accent-strong-rgb), 0.18);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    align-items: stretch;
    padding: 0;
}

.gallery-grid[aria-busy="true"] {
    position: relative;
    min-height: 0;
}

.gallery-grid[aria-busy="true"]::before {
    content: none;
}

.gallery-item,
.gallery-item:nth-child(7n + 1),
.gallery-item:nth-child(7n + 2),
.gallery-item:nth-child(7n + 5) {
    grid-column: auto;
}

.gallery-item {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: stretch;
    height: 100%;
    overflow: hidden;
    gap: 0;
    padding: 0;
    border-radius: 30px;
    border: 1px solid var(--theme-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 247, 0.96)),
        var(--theme-surface-gradient);
    box-shadow: 0 20px 38px rgba(20, 28, 39, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.gallery-item--skeleton {
    opacity: 1;
    transform: none;
    animation: none;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 48px rgba(20, 28, 39, 0.12);
    border-color: var(--theme-border-strong);
}

.gallery-item--skeleton:hover {
    transform: none;
    box-shadow: var(--theme-shadow);
    border-color: var(--theme-border);
}

.gallery-image,
.gallery-item:nth-child(7n + 1) .gallery-image,
.gallery-item:nth-child(7n + 2) .gallery-image,
.gallery-item:nth-child(7n + 5) .gallery-image {
    position: relative;
    height: auto;
    aspect-ratio: 15 / 10;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 30px 30px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img,
.gallery-item:focus-within .gallery-image img {
    transform: scale(1.035);
}

.gallery-item--skeleton .gallery-image {
    background: linear-gradient(180deg, rgba(231, 237, 243, 0.92), rgba(219, 228, 236, 0.76));
}

.gallery-item--skeleton .gallery-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.36) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: gallerySkeletonShimmer 1.8s ease-in-out infinite;
}

.gallery-image::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 0;
    pointer-events: none;
    z-index: 2;
}

.gallery-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 19, 32, 0.02) 6%, rgba(28, 34, 42, 0.28) 100%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}





.zoom-btn {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    cursor: zoom-in;
}

.zoom-btn::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 24px rgba(20, 28, 39, 0.14);
    transition: transform 0.2s ease, background 0.2s ease;
}

.zoom-btn::after {
    content: "Открыть фото";
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: var(--theme-text-strong);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.028em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(20, 28, 39, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.zoom-btn i {
    position: absolute;
    top: 35px;
    right: 35px;
    color: var(--theme-accent);
    font-size: 0.92rem;
    transform: translate(50%, -50%);
    transition: transform 0.2s ease;
}

.gallery-item:hover .zoom-btn::before,
.gallery-item:focus-within .zoom-btn::before {
    transform: translateY(-1px);
    background: #ffffff;
}

.gallery-item:hover .gallery-image::after,
.gallery-item:focus-within .gallery-image::after {
    opacity: 1;
}

.gallery-item:hover .zoom-btn::after,
.gallery-item:focus-within .zoom-btn::after {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover .zoom-btn i,
.gallery-item:focus-within .zoom-btn i {
    transform: translate(50%, -50%) scale(1.05);
}

.work-info {
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-content: start;
    gap: 12px;
    min-height: 154px;
    margin: 14px;
    margin-top: 12px;
    padding: 18px 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 242, 235, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.work-info--compact {
    grid-template-rows: auto 1fr;
    gap: 10px;
    min-height: 128px;
    padding-top: 16px;
    padding-bottom: 18px;
}

.work-category {
    margin: 0;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.1);
    background: rgba(239, 245, 250, 0.98);
    color: #5f7387;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.work-category::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong));
    box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.1);
    flex: 0 0 auto;
}

.work-title {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: 1.08rem;
    line-height: 1.24;
    font-weight: 760;
    letter-spacing: -0.01em;
    min-height: calc(1em * 1.24 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-note {
    margin: 0;
    margin-top: auto;
    color: rgba(72, 86, 101, 0.9);
    font-size: 0.91rem;
    line-height: 1.48;
    font-weight: 540;
    min-height: calc(1em * 1.48 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: pretty;
}

.gallery-skeleton-pill,
.gallery-skeleton-line {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(226, 233, 240, 0.94), rgba(214, 223, 232, 0.8));
}

.gallery-skeleton-pill::before,
.gallery-skeleton-line::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.42) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: gallerySkeletonShimmer 1.8s ease-in-out infinite;
}

.gallery-skeleton-pill {
    width: 46%;
    height: 32px;
    border-radius: 999px;
}

.gallery-skeleton-line {
    border-radius: 12px;
}

.gallery-skeleton-line--title {
    width: 82%;
    height: calc(1em * 1.38 * 2);
}

.gallery-skeleton-line--note {
    width: 100%;
    height: calc(1em * 1.56 * 3);
}

@keyframes gallerySkeletonShimmer {
    to {
        transform: translateX(100%);
    }
}

.gallery-more {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 34px;
    padding: 26px 20px 0;
    text-align: center;
    border-top: 1px solid rgba(var(--theme-accent-rgb), 0.12);
}

.gallery-more__meta {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.gallery-show-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 14px 22px;
    border-radius: 16px;
    border: 1px solid var(--theme-border-strong);
    background: rgba(255, 255, 255, 0.88);
    color: var(--theme-text);
    box-shadow: 0 16px 26px rgba(20, 28, 39, 0.05);
}

.gallery-show-more:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.gallery-more__helper {
    display: grid;
    gap: 0;
    width: min(100%, 720px);
    padding: 10px 0 0;
    border-radius: 22px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-more__helper[hidden] {
    display: none !important;
}

.gallery-more__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.gallery-more__action {
    min-width: 210px;
    gap: 9px;
}

.gallery-more__action--quiet {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(var(--theme-accent-rgb), 0.14);
    color: rgba(74, 88, 106, 0.9);
}

.gallery-empty {
    max-width: 720px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-soft);
    text-align: center;
}

.gallery-empty[hidden] {
    display: none !important;
}

.gallery-empty__reset {
    margin-top: 18px;
}

.order-cta {
    display: grid;
    position: relative;
    overflow: hidden;
    gap: 0;
    margin-top: 48px;
    padding: 28px 30px;
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 242, 235, 0.9));
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow-soft);
    text-align: left;
}

.order-cta::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -6%;
    width: 112%;
    height: 240%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-accent-rgb), 0.22) 0%, rgba(var(--theme-accent-rgb), 0.14) 18%, rgba(var(--theme-accent-rgb), 0.08) 34%, rgba(255, 255, 255, 0) 74%);
    opacity: 0.92;
    pointer-events: none;
    transform: translate3d(0, -50%, 0) scale(1);
    transform-origin: center;
    animation: orderCtaGlowDrift 14s ease-in-out infinite;
}

.order-cta::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10%;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.68) 0%, rgba(var(--theme-accent-rgb), 0.16) 18%, rgba(var(--theme-accent-rgb), 0.08) 42%, rgba(255, 255, 255, 0) 76%);
    opacity: 0.76;
    pointer-events: none;
    transform: translate3d(0, -50%, 0) scale(1);
    transform-origin: center;
    animation: orderCtaPulse 9s ease-in-out infinite;
}

.order-cta > * {
    position: relative;
    z-index: 1;
}

.order-cta__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
}

.order-cta__copy {
    display: grid;
    gap: 12px;
    align-content: start;
}

.order-cta__eyebrow {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(var(--theme-accent-rgb), 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(94, 78, 60, 0.82);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.order-cta__eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.92), rgba(var(--theme-accent-strong-rgb), 0.72));
    box-shadow: 0 0 0 5px rgba(var(--theme-accent-rgb), 0.08);
    flex: 0 0 auto;
}

.order-cta__copy h2 {
    margin: 0;
    color: var(--theme-text-strong);
    font-family: var(--font-display);
    max-width: 18ch;
    font-size: clamp(2rem, 2.48vw, 2.62rem);
    line-height: 0.97;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.order-cta__title-line {
    display: inline;
}

.order-cta__copy p {
    margin: 0;
    max-width: 56ch;
    color: var(--theme-text-muted);
    font-size: 0.96rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.order-cta__proof {
    position: relative;
    display: grid;
    justify-items: end;
    align-content: center;
    gap: 8px;
    min-height: 0;
    min-width: 230px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: right;
}

.order-cta__proof::before {
    display: none;
}

.order-cta__proof::after {
    display: none;
}

.order-cta__proof-label,
.order-cta__proof-value {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}

.order-cta__proof-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    min-width: auto;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: rgba(10, 24, 40, 0.92);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: none;
}

.order-cta__proof-number {
    display: inline-block;
    min-width: 0;
    color: var(--theme-accent-strong);
    font-size: clamp(4.6rem, 5.8vw, 6.4rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.84;
    text-shadow:
        0 0 18px rgba(var(--theme-accent-rgb), 0.08),
        0 16px 30px rgba(var(--theme-accent-strong-rgb), 0.12);
}

.order-cta__proof-note {
    color: rgba(91, 77, 59, 0.84);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.18;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-width: 14ch;
}

.order-cta__proof-meta {
    color: rgba(91, 77, 59, 0.8);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.42;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-width: 18ch;
}

.order-cta.is-proof-visible .order-cta__proof-label,
.order-cta.is-proof-visible .order-cta__proof-value,
.order-cta.is-proof-visible .order-cta__proof-note,
.order-cta.is-proof-visible .order-cta__proof-meta {
    opacity: 1;
    transform: translateY(0);
}

.order-cta.is-proof-visible .order-cta__proof-label {
    transition-delay: 0.04s;
}

.order-cta.is-proof-visible .order-cta__proof-value {
    transition-delay: 0.14s;
}

.order-cta.is-proof-visible .order-cta__proof-note {
    transition-delay: 0.26s;
}

.order-cta.is-proof-visible .order-cta__proof-meta {
    transition-delay: 0.34s;
}

.order-cta.is-proof-visible .order-cta__proof::before {
    animation: none;
}

.order-cta.is-proof-visible .order-cta__proof::after {
    animation: none;
}

.order-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 6px;
}

.order-cta .btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 18px;
    padding: 12px 20px;
    font-weight: 650;
    letter-spacing: -0.01em;
    transition:
        background-color 0.24s ease,
        border-color 0.24s ease,
        color 0.24s ease,
        box-shadow 0.24s ease,
        transform 0.24s ease;
}

body#top .order-cta .btn i {
    opacity: 0.84;
    font-size: 0.94em;
}

.order-cta__button-label-short {
    display: none;
}

body#top .order-cta .order-cta__button--primary {
    background: #d5dde2 !important;
    background-image: none !important;
    background-color: #d5dde2 !important;
    color: #31495e !important;
    border: 1px solid rgba(98, 121, 139, 0.18) !important;
    box-shadow:
        0 4px 10px rgba(98, 121, 139, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.44) !important;
}

body#top .order-cta .order-cta__button--primary:hover,
body#top .order-cta .order-cta__button--primary:focus-visible {
    background: #c6d1d8 !important;
    background-image: none !important;
    background-color: #c6d1d8 !important;
    color: #2c4357 !important;
    transform: translateY(-1px);
    box-shadow:
        0 6px 12px rgba(98, 121, 139, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.46) !important;
}

body#top .order-cta .order-cta__button--secondary {
    background: #e5edf4 !important;
    color: #4a657b !important;
    border: 1px solid rgba(53, 91, 119, 0.18) !important;
    box-shadow:
        0 10px 18px rgba(53, 91, 119, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body#top .order-cta .order-cta__button--secondary:hover,
body#top .order-cta .order-cta__button--secondary:focus-visible {
    background: #d7e3ed !important;
    color: #355b77 !important;
    border-color: rgba(53, 91, 119, 0.24) !important;
    font-weight: 650;
    transform: translateY(-1px);
    box-shadow:
        0 12px 20px rgba(53, 91, 119, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

@keyframes orderCtaGlowDrift {
    0%, 100% {
        transform: translate3d(0, -50%, 0) scale(1);
    }
    50% {
        transform: translate3d(-22px, calc(-50% - 10px), 0) scale(1.05);
    }
}

@keyframes orderCtaPulse {
    0%, 100% {
        transform: translate3d(0, -50%, 0) scale(1);
    }
    50% {
        transform: translate3d(8px, calc(-50% - 8px), 0) scale(1.06);
    }
}

@keyframes orderCtaProofGlow {
    0% {
        opacity: 0;
        transform: translate3d(-24px, 18px, 0) scale(0.92);
    }
    35% {
        opacity: 1;
    }
    100% {
        opacity: 0.72;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes orderCtaProofSweep {
    0% {
        opacity: 0;
        transform: translateX(-180%);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(520%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-cta::before,
    .order-cta::after,
    .order-cta__proof::before,
    .order-cta__proof::after {
        animation: none;
    }

    .order-cta__proof-label,
    .order-cta__proof-value,
    .order-cta__proof-note,
    .order-cta__proof-meta {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 1220px) {
    .gallery-page {
        padding-bottom: 54px;
    }

    .gallery-page > .container {
        width: min(100%, calc(100vw - 36px));
    }

    body#top .gallery-page .gallery-filter-shell {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body#top .gallery-page .gallery-filter-intro {
        max-width: 34rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid[aria-busy="true"] {
        min-height: 0;
    }

    .order-cta__layout {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 22px;
    }

    .order-cta::before {
        right: -14%;
        width: 120%;
        height: 220%;
    }

    .order-cta::after {
        right: 4%;
        width: 20rem;
        height: 20rem;
    }

    .order-cta__actions {
        width: 100%;
    }
}

@media (min-width: 820px) and (max-width: 1100px) {
    .gallery-page {
        padding-bottom: 16px;
    }

    .gallery-more {
        margin-top: 22px;
        padding-top: 16px;
    }

    .order-cta {
        margin-top: 30px;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .order-cta {
        padding: clamp(22px, 2.5vw, 26px) clamp(22px, 2.8vw, 30px);
        border-radius: 30px;
    }

    .order-cta__layout {
        grid-template-columns: minmax(0, 1fr) clamp(166px, 22vw, 238px);
        gap: clamp(18px, 2.5vw, 24px);
        align-items: center;
    }

    .order-cta__copy {
        gap: 10px;
    }

    .order-cta__copy h2 {
        max-width: 16ch;
        font-size: clamp(1.72rem, 2.5vw, 2.18rem);
        line-height: 0.98;
    }

    .order-cta__copy p {
        max-width: 48ch;
        font-size: 0.9rem;
        line-height: 1.42;
    }

    .order-cta__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: min(100%, 390px);
        margin-top: 2px;
    }

    .order-cta .btn {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 14px;
        gap: 7px;
        font-size: clamp(0.8rem, 1.05vw, 0.9rem);
        line-height: 1.08;
        white-space: nowrap;
    }

    .order-cta__proof {
        min-width: 0;
        gap: 5px;
    }

    .order-cta__proof-label {
        font-size: 0.66rem;
        letter-spacing: 0.12em;
    }

    .order-cta__proof-number {
        font-size: clamp(3.6rem, 5.7vw, 5.2rem);
    }

    .order-cta__proof-note {
        max-width: 12ch;
        font-size: 0.86rem;
    }

    .order-cta__proof-meta {
        max-width: 17ch;
        font-size: 0.76rem;
        line-height: 1.34;
    }
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 84px 0 48px;
    }

    .gallery-page > .container {
        width: min(100%, calc(100vw - 24px));
    }

    .gallery-header {
        gap: 14px;
        margin-bottom: 30px;
    }

    .gallery-header > h1 {
        font-size: clamp(2.4rem, 10vw, 3.4rem);
        gap: 12px;
    }

    .gallery-header > h1 i {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.3rem;
    }

    body#top .gallery-page .gallery-filter-shell {
        padding: 14px;
        margin-bottom: 26px;
    }

    body#top .gallery-page .gallery-filter-intro {
        gap: 6px;
        max-width: none;
    }

    body#top .gallery-page .gallery-filter-intro__copy {
        max-width: none;
        white-space: normal;
    }

    body#top .gallery-page .gallery-filter-intro__title {
        max-width: none;
        white-space: normal;
    }

    body#top .gallery-page .gallery-filter-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-grid[aria-busy="true"] {
        min-height: 0;
    }

    .gallery-more {
        margin-top: 28px;
        padding-top: 10px;
    }

    .gallery-more__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .gallery-more__action {
        width: 100%;
        min-width: 0;
    }

    .gallery-image,
    .gallery-item:nth-child(7n + 1) .gallery-image,
    .gallery-item:nth-child(7n + 2) .gallery-image,
    .gallery-item:nth-child(7n + 5) .gallery-image {
        aspect-ratio: 15 / 10;
    }

    .order-cta {
        padding: 24px 22px;
        gap: 18px;
    }

    .order-cta::before {
        top: 56%;
        right: -18%;
        width: 134%;
        height: 180%;
    }

    .order-cta::after {
        right: -8%;
        width: 16rem;
        height: 16rem;
    }

    .order-cta__layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .order-cta__proof {
        min-width: 0;
        padding: 2px 0 6px;
        gap: 8px;
        justify-items: start;
        text-align: left;
    }

    .order-cta__proof-note {
        font-size: 0.94rem;
    }

    .order-cta__proof-number {
        font-size: clamp(3.8rem, 13vw, 5rem);
    }

    .order-cta__copy h2 {
        max-width: 17ch;
    }

    .order-cta__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

}

@media (min-width: 641px) and (max-width: 768px) {
    .order-cta {
        padding: 22px 24px;
        border-radius: 28px;
    }

    .order-cta__layout {
        grid-template-columns: minmax(0, 1fr) clamp(136px, 23vw, 170px);
        gap: 16px;
        align-items: center;
    }

    .order-cta__copy {
        gap: 10px;
    }

    .order-cta__eyebrow {
        min-height: 28px;
        padding: 5px 10px;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .order-cta__copy h2 {
        max-width: 15ch;
        font-size: clamp(1.62rem, 3.65vw, 1.92rem);
        line-height: 0.98;
    }

    .order-cta__copy p {
        max-width: 47ch;
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .order-cta__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: min(100%, 410px);
        margin-top: 2px;
    }

    .order-cta .btn {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 14px;
        gap: 7px;
        font-size: 0.82rem;
        line-height: 1.08;
        white-space: nowrap;
    }

    .order-cta__proof {
        min-width: 0;
        justify-items: end;
        text-align: right;
        gap: 5px;
    }

    .order-cta__proof-label {
        font-size: 0.62rem;
        letter-spacing: 0.13em;
    }

    .order-cta__proof-number {
        font-size: clamp(3.35rem, 8.4vw, 4.15rem);
        line-height: 0.82;
    }

    .order-cta__proof-note {
        max-width: 12ch;
        font-size: 0.84rem;
    }

    .order-cta__proof-meta {
        max-width: 17ch;
        font-size: 0.74rem;
        line-height: 1.32;
    }
}

@media (min-width: 700px) and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .gallery-item {
        border-radius: 24px;
    }

    .gallery-image,
    .gallery-item:nth-child(7n + 1) .gallery-image,
    .gallery-item:nth-child(7n + 2) .gallery-image,
    .gallery-item:nth-child(7n + 5) .gallery-image {
        aspect-ratio: 4 / 3;
    }

    .work-info {
        min-height: auto;
        padding: 18px 16px 20px;
    }

    .work-info h3 {
        font-size: 1.02rem;
        line-height: 1.22;
    }

    .work-note {
        min-height: 0;
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

@media (max-width: 540px) {
    .gallery-page {
        padding: 72px 0 40px;
        overflow-x: clip;
    }

    .order-cta {
        padding: 18px;
        border-radius: 22px;
    }

    .order-cta::before {
        right: -28%;
        width: 148%;
        height: 165%;
    }

    .order-cta::after {
        right: -10%;
        width: 13.5rem;
        height: 13.5rem;
    }

    .order-cta__proof-note,
    .order-cta__proof-meta {
        max-width: 30ch;
    }

    .order-cta__layout {
        gap: 12px;
    }

    .order-cta__eyebrow {
        min-height: 28px;
        padding: 5px 10px;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .order-cta__copy h2 {
        max-width: none;
        font-size: clamp(1.56rem, 7.2vw, 1.92rem);
        line-height: 0.98;
    }

    .order-cta__title-line {
        display: block;
    }

    .order-cta__copy p {
        font-size: 0.9rem;
        line-height: 1.42;
    }

    .order-cta__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .order-cta .btn {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 15px;
        font-size: 0.88rem;
        gap: 7px;
        white-space: nowrap;
    }

    .order-cta__button-label-full {
        display: none;
    }

    .order-cta__button-label-short {
        display: inline;
    }

    .order-cta__proof {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-height: 0;
        padding: 0;
    }

    .order-cta__proof-label,
    .order-cta__proof-value,
    .order-cta__proof-note {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .order-cta__proof-label {
        max-width: 8ch;
        font-size: 0.6rem;
        line-height: 1.1;
        letter-spacing: 0.12em;
    }

    .order-cta__proof-number {
        font-size: clamp(2.15rem, 10.5vw, 2.75rem);
        line-height: 0.82;
    }

    .order-cta__proof-note {
        max-width: 8ch;
        font-size: 0.72rem;
        line-height: 1.08;
    }

    .order-cta__proof-meta {
        display: none;
    }

    body#top .gallery-page .gallery-filter-shell {
        padding: 10px 10px 12px;
        border-radius: 22px;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.985), rgba(247, 242, 234, 0.94)),
            rgba(255, 255, 255, 0.96);
        box-shadow: 0 16px 30px rgba(var(--theme-text-strong-rgb), 0.06);
        overflow: visible;
    }

    body#top .gallery-page .gallery-filter-shell::before {
        opacity: 0.22;
        transform: translate(-14px, -10px) scale(0.9);
    }

    body#top .gallery-page .gallery-filter-shell::after {
        opacity: 0.12;
    }

    body#top .gallery-page .gallery-filter-body {
        position: relative;
        min-width: 0;
        overflow: visible;
    }

    body#top .gallery-page .gallery-filter-body::before,
    body#top .gallery-page .gallery-filter-body::after {
        display: none;
    }

    body#top .gallery-page .gallery-filter-hint {
        position: absolute;
        top: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        z-index: 4;
        min-width: 28px;
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(255, 248, 238, 0.72);
        background: linear-gradient(180deg, rgba(255, 251, 244, 0.9), rgba(238, 226, 209, 0.74));
        box-shadow:
            0 10px 20px rgba(13, 28, 43, 0.18),
            0 2px 6px rgba(13, 28, 43, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
        color: transparent;
        font-size: 0;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        transform: translateY(-50%) scale(0.9);
        transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
        user-select: none;
    }

    body#top .gallery-page .gallery-filter-hint::before {
        content: "";
        display: block;
        width: 13px;
        height: 9px;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.65));
        transform: translateX(-0.2px);
    }

    body#top .gallery-page .gallery-filter-hint--left {
        left: 6px;
    }

    body#top .gallery-page .gallery-filter-hint--left::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 9' fill='none'%3E%3Cpath d='M5.35 1.25 2 4.5l3.35 3.25' stroke='%230D1C2B' stroke-opacity='.95' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.85 1.25 7.5 4.5l3.35 3.25' stroke='%230D1C2B' stroke-opacity='.95' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    body#top .gallery-page .gallery-filter-hint--right {
        right: 6px;
    }

    body#top .gallery-page .gallery-filter-hint--right::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 9' fill='none'%3E%3Cpath d='M2.15 1.25 5.5 4.5 2.15 7.75' stroke='%230D1C2B' stroke-opacity='.95' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7.65 1.25 11 4.5 7.65 7.75' stroke='%230D1C2B' stroke-opacity='.95' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-end) .gallery-filter-hint--right {
        opacity: 0.94;
        animation: galleryMobileSwipeCueRight 1.6s ease-in-out infinite;
    }

    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-start) .gallery-filter-hint--left {
        opacity: 0.94;
        animation: galleryMobileSwipeCueLeft 1.6s ease-in-out infinite;
    }

    body#top .gallery-page .gallery-filter-body.is-at-end .gallery-filter-hint--right,
    body#top .gallery-page .gallery-filter-body.is-at-start .gallery-filter-hint--left {
        opacity: 0;
        transform: translateY(-50%) scale(0.82);
    }

    body#top .gallery-page .gallery-filter-list::before,
    body#top .gallery-page .gallery-filter-list::after {
        display: none;
    }

    body#top .gallery-page .gallery-filter-list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 4px;
        padding: 2px 38px 6px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body#top .gallery-page .gallery-filter-list::-webkit-scrollbar {
        display: none;
    }

    body#top .gallery-page .gallery-filter-intro__title {
        font-size: 1.32rem;
    }

    body#top .gallery-page .gallery-filter-intro__copy {
        display: none;
    }

    .filter-btn {
        position: relative;
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        min-height: 36px;
        padding: 6px 9px;
        justify-content: center;
        align-items: center;
        font-size: 0.78rem;
        line-height: 1.1;
        border-radius: 14px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .filter-btn.active {
        padding-right: 9px;
    }

    .filter-btn.active::before {
        content: none;
    }

    .filter-btn.active::after {
        content: none;
    }

    .gallery-more__meta {
        font-size: 0.88rem;
    }

    .gallery-image,
    .gallery-item:nth-child(7n + 1) .gallery-image,
    .gallery-item:nth-child(7n + 2) .gallery-image,
    .gallery-item:nth-child(7n + 5) .gallery-image {
        aspect-ratio: 4 / 3;
    }

    .work-info {
        min-height: auto;
        padding: 18px 16px 20px;
    }

    .work-note {
        font-size: 0.92rem;
        min-height: auto;
    }

    .zoom-btn {
        inset: 0;
        width: auto;
        height: auto;
    }

    .zoom-btn::before {
        top: 12px;
        right: 12px;
        bottom: auto;
        left: auto;
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .zoom-btn i {
        top: 32px;
        right: 32px;
        left: auto;
        font-size: 0.9rem;
        transform: translate(50%, -50%);
    }

}

@keyframes galleryMobileSwipeCueRight {
    0%, 100% {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }

    50% {
        opacity: 0.78;
        transform: translate(1.5px, -50%) scale(1);
    }
}

@keyframes galleryMobileSwipeCueLeft {
    0%, 100% {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }

    50% {
        opacity: 0.78;
        transform: translate(-1.5px, -50%) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-end) .gallery-filter-hint--right,
    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-start) .gallery-filter-hint--left {
        animation: none;
    }
}

@media (max-width: 380px) {
    body#top .gallery-page .gallery-filter-shell {
        padding: 9px 9px 11px;
    }

    body#top .gallery-page .gallery-filter-hint {
        min-width: 24px;
        width: 24px;
        height: 24px;
    }

    body#top .gallery-page .gallery-filter-hint--left {
        left: 4px;
    }

    body#top .gallery-page .gallery-filter-hint--right {
        right: 4px;
    }

    body#top .gallery-page .gallery-filter-list {
        gap: 4px;
        padding: 2px 32px 6px;
    }

    .filter-btn {
        min-height: 34px;
        padding: 6px 8px;
        font-size: 0.74rem;
    }

    .filter-btn.active {
        padding-right: 8px;
    }
}

@keyframes galleryMobileActiveArrow {
    0%, 100% {
        transform: translateY(-50%) translateX(0) rotate(45deg);
        opacity: 0.9;
    }

    50% {
        transform: translateY(-50%) translateX(2px) rotate(45deg);
        opacity: 1;
    }
}

/* ========== GALLERY INTRO ALIGNMENT WITH CONTACTS ========== */

.gallery-header {
    display: grid;
    justify-items: start;
    gap: 18px;
    max-width: 1220px;
    margin: 0 0 34px;
    text-align: left;
}

.gallery-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
}

.gallery-heading__lead {
    display: grid;
    gap: 2px;
    min-width: 0;
    justify-items: start;
}

.gallery-heading__title-row {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.gallery-heading__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 235, 0.94)),
        linear-gradient(180deg, rgba(var(--theme-accent-rgb), 0.14), rgba(var(--theme-accent-rgb), 0.05));
    border: 1px solid rgba(var(--theme-accent-rgb), 0.12);
    box-shadow:
        0 10px 18px rgba(var(--theme-accent-rgb), 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.58);
    color: rgba(var(--theme-accent-rgb), 0.92);
    font-size: 1.18rem;
    flex-shrink: 0;
}

.gallery-heading__eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: rgba(var(--theme-accent-rgb), 0.82);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-header .gallery-title {
    margin: 0;
    max-width: none;
    font-family: var(--font-display);
    font-size: clamp(1.96rem, 2.18vw, 2.34rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: rgba(10, 24, 40, 0.99);
    text-align: left;
    justify-self: start;
    text-wrap: balance;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.gallery-header .gallery-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 2px;
    margin: 12px 0 0;
    background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.78), rgba(var(--theme-accent-rgb), 0.12));
    border-radius: 999px;
}

.gallery-header .gallery-subtitle {
    margin: 0;
    max-width: 62ch;
    padding-left: 0;
    border-left: 0;
    color: rgba(72, 89, 106, 0.92) !important;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.42;
    text-align: left;
    justify-self: start;
    align-self: start;
    text-wrap: pretty;
}

@media (max-width: 900px) {
    .gallery-page {
        padding-top: 82px;
    }

    .gallery-header {
        gap: 14px;
        margin-bottom: 24px;
    }

    .gallery-heading__title-row {
        gap: 12px;
    }

    .gallery-heading__icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 1.05rem;
    }

    .gallery-header .gallery-title {
        font-size: clamp(1.88rem, 7vw, 2.34rem);
    }

    .gallery-header .gallery-subtitle {
        max-width: 54ch;
        font-size: 0.92rem;
        line-height: 1.38;
    }
}

@media (max-width: 560px) {
    .gallery-page {
        padding-top: 42px;
    }

    .gallery-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .gallery-heading__lead {
        min-height: 93px;
    }

    .gallery-heading__title-row {
        gap: 10px;
    }

    .gallery-heading__icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
        font-size: 1rem;
    }

    .gallery-header .gallery-subtitle {
        max-width: none;
        font-size: 0.94rem;
    }
}

@media (min-width: 641px) and (max-width: 1100px) {
    body#top .gallery-page .gallery-filter-shell {
        display: grid;
        grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
        align-items: center;
        gap: 10px 14px;
        padding: 12px 13px;
        border-radius: 24px;
        overflow: hidden;
    }

    body#top .gallery-page .gallery-filter-intro {
        align-self: center;
        gap: 4px;
        max-width: 15.5rem;
        min-width: 0;
    }

    body#top .gallery-page .gallery-filter-intro__title {
        max-width: 14ch;
        font-size: clamp(1.28rem, 1.04rem + 0.62vw, 1.62rem);
        line-height: 0.94;
        white-space: normal;
    }

    body#top .gallery-page .gallery-filter-intro__copy {
        display: block;
        max-width: 26ch;
        font-size: clamp(0.66rem, 0.54rem + 0.28vw, 0.82rem);
        line-height: 1.2;
        white-space: normal;
    }

    body#top .gallery-page .gallery-filter-body {
        position: relative;
        min-width: 0;
        overflow: visible;
    }

    body#top .gallery-page .gallery-filter-hint,
    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-end) .gallery-filter-hint--right,
    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-start) .gallery-filter-hint--left {
        display: none;
        opacity: 0;
        animation: none;
    }

    body#top .gallery-page .gallery-filter-list {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 7px;
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
    }

    body#top .gallery-page .filter-btn {
        width: 100%;
        min-width: 0;
        min-height: clamp(30px, 3.7vw, 36px);
        padding: 6px 7px;
        justify-content: center;
        gap: 5px;
        border-radius: 999px;
        font-size: clamp(0.64rem, 0.52rem + 0.3vw, 0.8rem);
        line-height: 1.05;
        text-align: center;
        white-space: nowrap;
    }

    body#top .gallery-page .filter-btn i {
        font-size: 0.92em;
        width: 1em;
        min-width: 1em;
        text-align: center;
    }

    body#top .gallery-page .filter-btn[data-filter="powder"] {
        grid-column: span 2;
    }
}

@media (min-width: 641px) and (max-width: 700px) {
    body#top .gallery-page .gallery-filter-shell {
        grid-template-columns: minmax(138px, 0.3fr) minmax(0, 1fr);
        gap: 10px 10px;
        padding-inline: 11px;
    }

    body#top .gallery-page .gallery-filter-intro__title {
        font-size: 1.2rem;
    }

    body#top .gallery-page .gallery-filter-intro__copy {
        max-width: 23ch;
        font-size: 0.62rem;
    }

    body#top .gallery-page .gallery-filter-list {
        gap: 5px;
    }

    body#top .gallery-page .filter-btn {
        gap: 3px;
        padding: 5px 4px;
        font-size: 0.58rem;
    }

    body#top .gallery-page .filter-btn i {
        font-size: 0.82em;
    }
}

@media (min-width: 641px) and (max-width: 819px) {
    .gallery-page {
        padding-bottom: 22px;
    }

    .gallery-more {
        margin-top: 22px;
        padding-top: 16px;
    }

    .order-cta {
        margin-top: 28px;
    }
}

body#top .gallery-page .filter-btn.active,
body#top .gallery-page .filter-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    border-color: transparent !important;
    color: #fffdf9 !important;
    box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14) !important;
}

body#top .gallery-page .filter-btn.active:hover,
body#top .gallery-page .filter-btn.active:focus-visible,
body#top .gallery-page .filter-btn[aria-pressed="true"]:hover,
body#top .gallery-page .filter-btn[aria-pressed="true"]:focus-visible {
    background: linear-gradient(135deg, #738a9d 0%, #5e7588 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 12px 20px rgba(var(--site-action-slate-rgb), 0.16) !important;
}

body#top .gallery-page .zoom-btn::after {
    content: none !important;
    display: none !important;
}

/* Phone browsers in "desktop site" mode report a wide but very tall touch viewport. */
@media (pointer: coarse) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3),
    (hover: none) and (min-width: 900px) and (max-width: 1600px) and (max-aspect-ratio: 2 / 3) {
    body#top .gallery-page {
        min-height: 0 !important;
        padding-top: 136px !important;
    }

    body#top .gallery-page > .container {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: none !important;
    }
}

@media (min-width: 900px) and (max-width: 1600px) and (max-height: 900px) and (orientation: landscape) and (pointer: coarse) {
    body#top .gallery-page {
        padding-top: 92px !important;
    }

    body#top .gallery-page > .container {
        width: min(100%, calc(100vw - 24px)) !important;
        max-width: none !important;
    }
}

@media (min-width: 1101px) and (min-height: 1400px) and (max-aspect-ratio: 9 / 10) {
    body#top .gallery-page .order-cta {
        margin-top: clamp(30px, 2.4vw, 48px) !important;
    }
}

/* Open mobile layout: filters and CTA use page width instead of nested shells. */
@media (max-width: 640px) {
    body#top .gallery-page > .container {
        width: calc(100vw - 28px) !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body#top .gallery-page .gallery-filter-shell {
        overflow: visible !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    body#top .gallery-page .gallery-filter-shell::before,
    body#top .gallery-page .gallery-filter-shell::after {
        content: none !important;
        display: none !important;
    }

    body#top .gallery-page .gallery-filter-intro {
        display: none !important;
    }

    body#top .gallery-page .gallery-filter-list {
        width: 100% !important;
        padding: 2px clamp(32px, 9vw, 40px) 7px 0 !important;
        scroll-padding-inline: 0 clamp(32px, 9vw, 40px) !important;
    }

    body#top .gallery-page .gallery-filter-hint {
        top: calc(50% - 2.5px) !important;
        transform: translateY(-50%) scale(0.92) !important;
    }

    body#top .gallery-page .gallery-filter-hint--left {
        left: calc(((100vw - 100%) / -2) + 6px) !important;
    }

    body#top .gallery-page .gallery-filter-hint--right {
        right: calc(((100vw - 100%) / -2) + 6px) !important;
    }

    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-end) .gallery-filter-hint--right,
    body#top .gallery-page .gallery-filter-body.has-overflow:not(.is-at-start) .gallery-filter-hint--left {
        transform: translateY(-50%) scale(1) !important;
    }

    body#top .gallery-page .gallery-filter-body.is-at-end .gallery-filter-hint--right,
    body#top .gallery-page .gallery-filter-body.is-at-start .gallery-filter-hint--left {
        transform: translateY(-50%) scale(0.84) !important;
    }

    body#top .gallery-grid {
        gap: 18px !important;
    }

    body#top .gallery-item {
        border-radius: 24px !important;
    }

    body#top .order-cta {
        overflow: visible !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    body#top .order-cta::before,
    body#top .order-cta::after {
        content: none !important;
        display: none !important;
    }
}

/* Photo-first gallery cards: rounded image with a short in-photo label. */
body#top .gallery-page {
    --gallery-card-radius: 30px;
    --gallery-card-label-inset: 16px;
}

body#top .gallery-page .gallery-item,
body#top .gallery-page .gallery-item:nth-child(7n + 1),
body#top .gallery-page .gallery-item:nth-child(7n + 2),
body#top .gallery-page .gallery-item:nth-child(7n + 5) {
    position: relative !important;
    display: block;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    border-radius: var(--gallery-card-radius) !important;
    border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.1) !important;
    background: #152636 !important;
    box-shadow:
        0 24px 42px rgba(20, 28, 39, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.62) inset !important;
    isolation: isolate;
}

body#top .gallery-page .gallery-image,
body#top .gallery-page .gallery-item:nth-child(7n + 1) .gallery-image,
body#top .gallery-page .gallery-item:nth-child(7n + 2) .gallery-image,
body#top .gallery-page .gallery-item:nth-child(7n + 5) .gallery-image {
    aspect-ratio: 4 / 3 !important;
    border-radius: inherit !important;
    background: #dfe7ee !important;
}

body#top .gallery-page .gallery-image::before {
    border-radius: inherit !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

body#top .gallery-page .gallery-image::after {
    background:
        linear-gradient(180deg, rgba(8, 19, 32, 0) 42%, rgba(8, 19, 32, 0.14) 70%, rgba(8, 19, 32, 0.56) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    opacity: 1 !important;
}

body#top .gallery-page .gallery-item:hover .gallery-image::after,
body#top .gallery-page .gallery-item:focus-within .gallery-image::after {
    opacity: 0.92 !important;
}

body#top .gallery-page .work-info,
body#top .gallery-page .work-info--compact {
    position: absolute !important;
    right: var(--gallery-card-label-inset) !important;
    bottom: var(--gallery-card-label-inset) !important;
    left: var(--gallery-card-label-inset) !important;
    z-index: 4 !important;
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
    transform: none !important;
    transition: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body#top .gallery-page .gallery-item:hover .work-info,
body#top .gallery-page .gallery-item:focus-within .work-info {
    transform: none !important;
}

body#top .gallery-page .work-category {
    display: block !important;
    width: auto !important;
    max-width: min(100%, 26ch);
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #fffdf8 !important;
    font-size: 0.9rem !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    text-shadow:
        0 2px 7px rgba(8, 19, 32, 0.72),
        0 10px 20px rgba(8, 19, 32, 0.34);
    overflow-wrap: anywhere;
}

body#top .gallery-page .work-category::before {
    content: none !important;
    display: none !important;
}

body#top .gallery-page .work-title {
    display: none !important;
}

body#top .gallery-page .work-note {
    display: none !important;
}

@media (max-width: 768px) {
    body#top .gallery-page {
        --gallery-card-radius: 24px;
        --gallery-card-label-inset: 14px;
    }

    body#top .gallery-page .work-category {
        font-size: 0.86rem !important;
    }
}

@media (max-width: 420px) {
    body#top .gallery-page {
        --gallery-card-label-inset: 12px;
    }
}

/* Final gallery color roles. */
body#top .gallery-page .filter-btn {
    background: var(--site-action-ghost) !important;
    background-image: var(--site-action-ghost) !important;
    border-color: var(--site-action-ghost-border) !important;
    color: var(--site-action-ghost-text) !important;
    box-shadow:
        0 12px 22px rgba(var(--site-action-slate-rgb), 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

body#top .gallery-page .filter-btn:hover,
body#top .gallery-page .filter-btn:focus-visible {
    background: var(--site-action-ghost-hover) !important;
    background-image: var(--site-action-ghost-hover) !important;
    border-color: rgba(var(--theme-accent-rgb), 0.2) !important;
    color: var(--site-action-ghost-text) !important;
}

body#top .gallery-page .filter-btn.active,
body#top .gallery-page .filter-btn[aria-pressed="true"],
body#top .gallery-page .filter-btn.active:hover,
body#top .gallery-page .filter-btn[aria-pressed="true"]:hover,
body#top .gallery-page .filter-btn.active:focus-visible,
body#top .gallery-page .filter-btn[aria-pressed="true"]:focus-visible {
    background: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #fffdf9 !important;
    box-shadow:
        0 14px 26px rgba(var(--site-action-slate-rgb), 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

body#top .gallery-page :is(.gallery-empty, .gallery-filters, .gallery-filter-shell) {
    background: var(--site-card-surface) !important;
    border-color: var(--site-card-border) !important;
    box-shadow: var(--site-card-shadow) !important;
}

@media (max-width: 640px) {
    body#top .gallery-page .gallery-filter-shell {
        background: none !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    body#top .gallery-page .gallery-filter-shell::before,
    body#top .gallery-page .gallery-filter-shell::after {
        content: none !important;
        display: none !important;
    }
}
