@charset "utf-8";
.page-gallery {
    background-color: var(--primary-white);
}

.gallery-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: calc(841 / 1440 * 100vw);
    aspect-ratio: 841 / 361;
    background: url(../images/gallery/ribbon-Left.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
}

.gallery-page::after {
    content: '';
    position: absolute;
    top: calc(104.68 / 1440 * 100vw);
    right: -7%;
    width: calc(511 / 1440 * 100vw);
    aspect-ratio: 511 / 319;
    background: url(../images/gallery/ribbon-Right.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
}

.gallery-page {
    background-color: var(--primary-white);
    padding: clamp(104px, 10vw, 160px) 0 clamp(120px, 13vw, 200px);
    position: relative;
    overflow: hidden;
}

.gallery__inner {
    width: min(87.5%, 1280px);
    margin: 0 auto;
}

.gallery-page__heading {
    text-align: center;
}

.gallery-page__title img {
    width: clamp(210px, 31vw, 445px);
    height: auto;
}

.gallery-page__filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
    margin-top: clamp(72px, 7.6vw, 110px);
    margin-bottom: clamp(76px, 8vw, 128px);
}

.gallery-page__filter-btn {
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-dustyPink);
    text-align: center;
    font-family: Italiana;
    font-size: clamp(16px, calc(20 / 1440 * 100vw), 24px);
    line-height: 1.5;
    letter-spacing: 0.02;
    cursor: pointer;
    opacity: 0.45;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.gallery-page__filter-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.16em;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: opacity 0.40s ease, transform 0.25s ease;
}

.gallery-page__filter-btn.is-active,
.gallery-page__filter-btn:hover {
    color: var(--primary-dustyPink);
    opacity: 1;
}

.gallery-page__filter-btn.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.gallery-page__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(44px, 7.2vw, 104px);
    row-gap: clamp(72px, 7.8vw, 124px);
    align-items: flex-end;
    opacity: 1;
    transition: opacity 0.24s ease;
}

.gallery-page__list.is-filtering {
    pointer-events: none;
}

.gallery-page__list.is-filtering-out {
    opacity: 0;
}

.gallery-card {
    --gallery-card-shift-y: 0px;
    opacity: 1;
    transform: translateY(0);
    transition: filter 0.28s ease;
}

.gallery-card.is-hidden {
    display: none;
}

.gallery-card__button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.gallery-card__figure {
    margin: 0;
}

.gallery-card__image-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 150 / 209;
    transition: transform 0.28s ease;
    transform: translateY(var(--gallery-card-shift-y));
}

.gallery-card__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.24) 50%, rgba(255, 255, 255, 0) 58%);
    background-repeat: no-repeat;
    background-size: 220% 100%;
    background-position: 160% 0;
    -webkit-mask-image: radial-gradient(ellipse 42% 42% at 50% 46%, #000 98%, transparent 100%);
    mask-image: radial-gradient(ellipse 42% 42% at 50% 46%, #000 98%, transparent 100%);
    pointer-events: none;
}

.gallery-card__button:hover .gallery-card__image-wrap::after {
    animation: galleryShine 1.2s linear;
}

.gallery-card__button:hover .gallery-card__image-wrap {
    transform: translateY(calc(var(--gallery-card-shift-y) - 4px));
}

@keyframes galleryShine {
    from {
        background-position: 160% 0;
    }
    to {
        background-position: -60% 0;
    }
}

.gallery-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: filter 0.28s ease;
}

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

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    background: var(--primary-white);
    padding: 0;
}

.gallery-modal__overlay {
    position: fixed;
    inset: 0;
    background: transparent;
}

.gallery-modal__content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: transparent;
}

.gallery-modal.is-opening .gallery-modal__overlay,
.gallery-modal.is-open .gallery-modal__overlay {
    animation: galleryModalFadeIn 0.46s ease forwards;
}

.gallery-modal.is-opening .gallery-modal__content,
.gallery-modal.is-open .gallery-modal__content {
    animation: galleryModalContentIn 0.54s cubic-bezier(.16, 1, .3, 1) forwards;
}

.gallery-modal.is-closing .gallery-modal__overlay {
    animation: galleryModalFadeOut 0.24s ease forwards;
}

.gallery-modal.is-closing .gallery-modal__content {
    animation: galleryModalContentOut 0.24s ease forwards;
}

@keyframes galleryModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes galleryModalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes galleryModalContentIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.965);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes galleryModalContentOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

.gallery-modal__close {
    position: absolute;
    /* top: calc(32 / 1440 * 100vw); */
    top: clamp(48px, calc(92 / 2048 * 100vw), 92px);
    right: clamp(32px, calc(112 / 2048 * 100vw), 112px);
    z-index: 2;
    display: grid;
    place-items: center;
    width: calc(40 / 1440 * 100vw);
    min-width: 32px;
    height: calc(40 / 1440 * 100vw);
    min-height: 32px;
    /* width: clamp(44px, calc(58 / 2048 * 100vw), 58px); */
    /* height: clamp(44px, calc(58 / 2048 * 100vw), 58px); */
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.gallery-modal__close-icon {
    display: block;
    /* width: clamp(28px, calc(41 / 2048 * 100vw), 41px); */
    height: auto;
}

.gallery-modal__body {
    width: min(54vw, 1080px);
    max-width: calc(100vw - 520px);
    padding: 0;
}

.gallery-modal__figure {
    margin: 0;
}

.gallery-modal__image-wrap {
    width: 100%;
}

.gallery-modal__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 90dvh;
    margin: 0 auto;
    object-fit: contain;
}

.gallery-modal__caption {
    display: none;
}

.gallery-modal__title {
    color: var(--primary-darkGreen);
    font-family: "Libre Caslon Display", "Bodoni Moda SC", serif;
    font-size: 1.4rem;
    line-height: 1.5;
    letter-spacing: 0;
}

.gallery-modal__nav {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    width: 100%;
    /* padding: 0 clamp(160px, calc(292 / 2048 * 100vw), 292px); */
    padding: calc(206 / 1440 * 100vw);
    pointer-events: none;
    transform: translateY(-50%);
}

.gallery-modal__prev,
.gallery-modal__next {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-dustyPink);
    font-family: Italiana;
    font-size: var(--fz-24);
    line-height: 1.5;
    letter-spacing: 0.02;
    cursor: pointer;
    pointer-events: auto;
}

body.is-fixed {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .gallery-page::before {
        width: calc(201 / 375 * 100vw);
        aspect-ratio: 201 / 103;
        top: calc(19.5 / 375 * 100vw);
        left: -27%;
    }
    .gallery-page::after {
        width: calc(142 / 375 * 100vw);
        aspect-ratio: 142 / 102;
        top: calc(98.25 / 375 * 100vw);
        right: -6%;
    }
    .gallery-page {
        padding: calc(88 / 375 * 100vw) 0 calc(88 / 375 * 100vw);
    }
    .gallery__inner {
        width: calc(333 / 375 * 100vw);
    }
    .gallery-page__title img {
        width: calc(178 / 375 * 100vw);
    }
    .gallery-page__filter {
        gap: calc(12 / 375 * 100vw);
        justify-content: flex-start;
        margin-top: calc(52 / 375 * 100vw);
        margin-bottom: calc(56 / 375 * 100vw);
    }
    .gallery-page__filter-btn {
        font-size: var(--fz-12sp);
    }
    .gallery-page__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: calc(40 / 375 * 100vw);
        row-gap: calc(56 / 375 * 100vw);
    }
    .gallery-modal {
        overflow: hidden;
    }
    .gallery-modal__content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100dvh;
        padding: calc(88 / 375 * 100vw) calc(24 / 375 * 100vw);
    }
    .gallery-modal__body {
        width: 100%;
        max-width: 100%;
    }
    .gallery-modal__image {
        max-height: 68dvh;
    }
    .gallery-modal__close {
        top: calc(40 / 375 * 100vw);
        right: calc(20 / 375 * 100vw);
        width: calc(40 / 375 * 100vw);
        max-width: 40px;
        height: calc(40 / 375 * 100vw);
    }
    .gallery-modal__close-icon {
        width: calc(28 / 375 * 100vw);
        max-width: 40px;
    }
    .gallery-modal__nav {
        position: static;
        /* padding: 0 calc(16 / 375 * 100vw); */
        padding: 0 16px;
        margin-top: 16px;
        transform: none;
    }
    .gallery-modal__prev,
    .gallery-modal__next {
        /* font-size: clamp(24px, calc(26 / 375 * 100vw), 28px); */
        font-size: var(--fz-13sp);
    }
}