

.tas-gallery-page {
    --tas-gallery-cream: var(--site-background, #FBF9EF);
    --tas-gallery-navy: #071D33;
    --tas-gallery-navy-deep: #061627;
    --tas-gallery-text: var(--color-text, #1A1A2E);
    --tas-gallery-muted: var(--color-muted, #6B7280);
    --tas-gallery-primary: var(--color-primary, #0B3A66);
    --tas-gallery-card-shadow: 0 18px 50px rgba(7, 29, 51, 0.16);
    --tas-gallery-card-radius: clamp(14px, 1.4vw, 24px);
    --tas-gallery-card-w: clamp(170px, 15vw, 250px);
    background: var(--tas-gallery-cream);
    color: var(--tas-gallery-text);
    overflow-x: clip;
}

.tas-gallery-page img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.tas-gallery-stage {
    position: relative;
    width: 100%;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.tas-gallery-card,
.tas-gallery-horizontal__item {
    margin: 0;
    overflow: hidden;
    border-radius: var(--tas-gallery-card-radius);
    box-shadow: var(--tas-gallery-card-shadow);
    border: 1px solid rgba(11, 58, 102, 0.08);
    background: #fff;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}


.tas-gallery-deck .tas-gallery-card {
    box-shadow: none !important;
    border: none !important;
}

.tas-gallery-deck .tas-gallery-card:last-child {
    box-shadow: var(--tas-gallery-card-shadow) !important;
}

.tas-gallery-deck.is-fanned .tas-gallery-card {
    box-shadow: var(--tas-gallery-card-shadow) !important;
}

.tas-gallery-final__card {
    margin: 0;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}


.tas-gallery-reduced {
    padding: clamp(5rem, 12vh, 8rem) var(--site-shell-pad-x, clamp(24px, 5.5vw, 90px)) 4rem;
}

.tas-gallery-reduced__inner {
    max-width: var(--site-shell-max, 1440px);
    margin-inline: auto;
}

.tas-gallery-reduced__title {
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.05em;
    color: var(--tas-gallery-primary);
    margin: 0 0 0.75rem;
}

.tas-gallery-reduced__text {
    max-width: 42rem;
    color: var(--tas-gallery-muted);
    margin: 0 0 2rem;
    font-weight: 400;
    line-height: 1.55;
}

.tas-gallery-reduced__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 22px);
}

.tas-gallery-reduced__item {
    margin: 0;
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--tas-gallery-card-shadow);
}

@media (min-width: 768px) {
    .tas-gallery-reduced__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .tas-gallery-reduced__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.tas-gallery-page.is-reduced-motion .tas-gallery-story {
    display: none;
}

.tas-gallery-page.is-reduced-motion .tas-gallery-reduced {
    display: block;
}

.tas-gallery-page:not(.is-reduced-motion) .tas-gallery-reduced {
    display: none;
}


.tas-gallery-hero {
    position: relative;
    background: var(--tas-gallery-cream);
}

.tas-gallery-hero__stage {
    position: relative;
    overflow: visible;
    perspective: 1200px;
}

.tas-gallery-hero__headline {
    position: absolute;
    left: 50%;
    top: clamp(7.25rem, 16vh, 9.75rem);
    transform: translateX(-50%);
    z-index: 4;
    margin: 0;
    width: min(90vw, 42rem);
    text-align: center;
    font-weight: 800;
    font-size: clamp(1.75rem, 3.6vw, 3.1rem);
    letter-spacing: -0.05em;
    line-height: 1.12;
    color: var(--tas-gallery-primary);
    pointer-events: none;
}

.tas-gallery-hero__headline-word {
    display: inline-block;
    margin-inline-end: 0.28em;
    opacity: 0;
    will-change: transform, opacity;
}

.tas-gallery-hero__headline-word:last-child {
    margin-inline-end: 0;
}


.tas-gallery-page:not(.is-reduced-motion) [data-gallery-hero-headline]:not([data-split="1"]) {
    visibility: hidden;
}

.tas-gallery-hero__intro {
    position: absolute;
    left: var(--site-shell-pad-x, clamp(24px, 5.5vw, 90px));
    top: 38%;
    z-index: 3;
    max-width: min(26rem, 34vw);
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
}

.tas-gallery-hero__eyebrow {
    display: inline-block;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tas-gallery-muted);
    margin-bottom: 0.85rem;
}

.tas-gallery-hero__title {
    font-weight: 800;
    font-size: clamp(1.85rem, 3.2vw, 3rem);
    letter-spacing: -0.05em;
    line-height: 1.08;
    color: var(--tas-gallery-primary);
    margin: 0 0 1rem;
}

.tas-gallery-hero__text {
    margin: 0;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    line-height: 1.6;
    color: var(--tas-gallery-muted);
    max-width: 34ch;
}

.tas-gallery-hero__entrance {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
}


.tas-gallery-page:not(.is-reduced-motion) [data-gallery-hero-entrance] {
    opacity: 0;
    transform: translate3d(0, 160px, 0);
}

.tas-gallery-deck {
    position: relative;
    width: var(--tas-gallery-card-w);
    aspect-ratio: 4 / 5;
}

.tas-gallery-deck .tas-gallery-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .tas-gallery-hero__headline {
        top: clamp(6.25rem, 14vh, 8rem);
        font-size: clamp(1.45rem, 6.2vw, 2.1rem);
    }

    .tas-gallery-hero__intro {
        left: 5%;
        right: 5%;
        top: 10%;
        max-width: none;
        text-align: center;
    }

    .tas-gallery-hero__text {
        margin-inline: auto;
    }
}


.tas-gallery-horizontal {
    position: relative;
    background: rgba(255, 255, 255, 0.30);
    color: var(--tas-gallery-text);
    min-height: 100svh;
    overflow: hidden;
}

.tas-gallery-horizontal__viewport {
    width: 100%;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.tas-gallery-horizontal__track {
    display: flex;
    align-items: center;
    gap: clamp(28px, 3vw, 52px);
    padding-inline: var(--site-shell-pad-x, clamp(24px, 5.5vw, 90px));
    width: max-content;
    will-change: transform;
}

.tas-gallery-horizontal__intro {
    flex: 0 0 clamp(260px, 28vw, 420px);
    max-width: 420px;
    padding-right: clamp(12px, 2vw, 28px);
}

.tas-gallery-horizontal__eyebrow {
    display: inline-block;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tas-gallery-muted);
    margin-bottom: 0.85rem;
}

.tas-gallery-horizontal__title {
    font-weight: 800;
    font-size: clamp(1.85rem, 3.2vw, 3rem);
    letter-spacing: -0.05em;
    line-height: 1.08;
    margin: 0 0 1rem;
    color: var(--tas-gallery-primary);
}

.tas-gallery-horizontal__text {
    margin: 0;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    line-height: 1.6;
    color: var(--tas-gallery-muted);
    max-width: 34ch;
}

.tas-gallery-horizontal__item {
    flex: 0 0 clamp(420px, 36vw, 650px);
    aspect-ratio: 4 / 3;
    border-radius: clamp(16px, 1.5vw, 28px);
    border-color: rgba(11, 58, 102, 0.08);
    box-shadow: 0 22px 60px rgba(7, 29, 51, 0.16);
    background: #fff;
}

.tas-gallery-diagonal .tas-gallery-stage {
    overflow: visible;
    perspective: 1200px;
}

.tas-gallery-card,
.tas-gallery-horizontal__item {
    transform-style: preserve-3d;
}

.tas-gallery-diagonal {
    background: var(--tas-gallery-cream);
}

.tas-gallery-diagonal__deck {
    position: relative;
    width: var(--tas-gallery-card-w);
    aspect-ratio: 4 / 5;
}

.tas-gallery-diagonal__deck .tas-gallery-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}


.tas-gallery-final {
    --tas-final-gap: clamp(12px, 1.6vw, 22px);
    --tas-final-card: clamp(88px, 7.2vw, 120px);
    background: transparent !important;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
}

.tas-gallery-final__stage {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(0.45rem, 1.4vh, 1rem);
    padding: clamp(0.6rem, 2vh, 1.4rem) 0;
    overflow: hidden;
    background: transparent !important;
}

.tas-gallery-final__row {
    position: relative;
    width: 100%;
    
    height: clamp(120px, 21vh, 165px);
    padding-block: clamp(16px, 2.4vh, 24px);
    box-sizing: content-box;
    flex: 0 0 auto;
    overflow-x: hidden;
    overflow-y: visible;
    background: transparent !important;
}

.tas-gallery-final__row--top {
    transform: translateY(clamp(-40px, -4.5vh, -28px));
}

.tas-gallery-final__row--bottom {
    transform: translateY(clamp(28px, 4.5vh, 40px));
}

.tas-gallery-final__heading {
    flex-shrink: 0;
    text-align: center;
    padding-inline: var(--site-shell-pad-x, clamp(24px, 5.5vw, 90px));
    max-width: 48rem;
    background: transparent;
}

.tas-gallery-final__strip {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    height: 100%;
    gap: 0;
    background: transparent !important;
    will-change: transform;
    backface-visibility: hidden;
}


.tas-gallery-final__strip--left {
    animation: tas-gallery-marquee-left 26s linear infinite;
}

.tas-gallery-final__strip--right {
    animation: tas-gallery-marquee-right 30s linear infinite;
}

@keyframes tas-gallery-marquee-left {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes tas-gallery-marquee-right {
    from { transform: translate3d(-50%, 0, 0); }
    to { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .tas-gallery-final__strip--left,
    .tas-gallery-final__strip--right {
        animation: none !important;
    }
}

.tas-gallery-final__card {
    flex: 0 0 var(--tas-final-card);
    width: var(--tas-final-card);
    aspect-ratio: 1 / 1;
    border-radius: clamp(14px, 1.6vw, 22px);
    margin: 0;
    margin-inline-end: var(--tas-final-gap);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
    will-change: transform;
    --bob-y: 0px;
    --bob-r: 0deg;
    --bob-amp: 10px;
    --bob-rd: 1deg;
    animation: tas-gallery-bob 2.3s ease-in-out infinite alternate;
}


.tas-gallery-final__card:nth-child(7n + 1) {
    --bob-y: -12px;
    --bob-r: -2.5deg;
    --bob-amp: -6px;
    --bob-rd: -0.8deg;
    animation-duration: 2.2s;
    animation-delay: 0s;
}
.tas-gallery-final__card:nth-child(7n + 2) {
    --bob-y: 10px;
    --bob-r: 2deg;
    --bob-amp: 6px;
    --bob-rd: 0.7deg;
    animation-duration: 2.4s;
    animation-delay: 0.1s;
}
.tas-gallery-final__card:nth-child(7n + 3) {
    --bob-y: -14px;
    --bob-r: -2deg;
    --bob-amp: -7px;
    --bob-rd: -0.8deg;
    animation-duration: 2.55s;
    animation-delay: 0.18s;
}
.tas-gallery-final__card:nth-child(7n + 4) {
    --bob-y: 8px;
    --bob-r: 2.5deg;
    --bob-amp: 6px;
    --bob-rd: 0.8deg;
    animation-duration: 2.25s;
    animation-delay: 0.05s;
}
.tas-gallery-final__card:nth-child(7n + 5) {
    --bob-y: -10px;
    --bob-r: -2deg;
    --bob-amp: -6px;
    --bob-rd: -0.7deg;
    animation-duration: 2.45s;
    animation-delay: 0.14s;
}
.tas-gallery-final__card:nth-child(7n + 6) {
    --bob-y: 12px;
    --bob-r: 2deg;
    --bob-amp: 7px;
    --bob-rd: 0.8deg;
    animation-duration: 2.2s;
    animation-delay: 0.08s;
}
.tas-gallery-final__card:nth-child(7n + 7) {
    --bob-y: -8px;
    --bob-r: -1.5deg;
    --bob-amp: -5px;
    --bob-rd: -0.6deg;
    animation-duration: 2.6s;
    animation-delay: 0.12s;
}

@keyframes tas-gallery-bob {
    from {
        transform: translateY(var(--bob-y)) rotate(var(--bob-r));
    }
    to {
        transform: translateY(calc(var(--bob-y) + var(--bob-amp))) rotate(calc(var(--bob-r) + var(--bob-rd)));
    }
}

@media (prefers-reduced-motion: reduce) {
    .tas-gallery-final__card {
        animation: none !important;
    }
}

.tas-gallery-final__title {
    font-weight: 800;
    font-size: clamp(1.55rem, 3.4vw, 2.6rem);
    letter-spacing: -0.05em;
    line-height: 1.08;
    color: var(--tas-gallery-primary);
    margin: 0 0 0.35rem;
}

.tas-gallery-final__text {
    margin: 0;
    font-weight: 400;
    color: var(--tas-gallery-muted);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.45;
}


@media (max-width: 1199.98px) {
    .tas-gallery-page {
        --tas-gallery-card-w: clamp(180px, 26vw, 260px);
    }

    .tas-gallery-horizontal__item {
        flex: 0 0 auto;
        width: auto;
        height: 72svh;
        aspect-ratio: 4 / 3;
    }

    .tas-gallery-horizontal__intro {
        flex-basis: clamp(240px, 40vw, 360px);
    }
}


@media (max-width: 767.98px) {
    .tas-gallery-page {
        --tas-gallery-card-w: clamp(148px, 44vw, 190px);
        --tas-gallery-card-radius: 14px;
        .tas-gallery-diagonal .tas-gallery-stage {
    min-height: 72svh;
}
    }

    .tas-gallery-horizontal__intro {
        flex: 0 0 80vw;
        max-width: 80vw;
    }

    .tas-gallery-horizontal__item {
        flex: 0 0 auto;
        width: calc(100vw - 32px);
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .tas-gallery-final__card {
        --tas-final-card: 20vw;
        flex-basis: 20vw;
        width: 20vw;
    }

    .tas-gallery-final__row {
        height: clamp(110px, 19vh, 140px);
        padding-block: clamp(14px, 2.2vh, 20px);
    }

    .tas-gallery-final {
        --tas-final-gap: clamp(10px, 2.5vw, 16px);
    }

    .tas-gallery-final__title {
        font-size: clamp(1.4rem, 6vw, 1.9rem);
    }
}

@media (max-width: 430px) {
    .tas-gallery-final__card {
        --tas-final-card: 22vw;
        flex-basis: 22vw;
        width: 22vw;
    }
}
