/* =========================================================
   COLLECTION PAGE
========================================================= */

/* =========================================================
   CHARACTER GRID BACKGROUND
========================================================= */
html,
body {
    margin: 0;
    padding: 0;
}
#character-base,
#character-hover {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 0;
}
header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 100;
}
.collection-page {
    position: relative;
    z-index: 10;
}
.custom-cursor {
    position: fixed !important;
    z-index: 99999 !important;
    pointer-events: none;
}

/* =========================================================
   COLLECTION HEADING
========================================================= */

.collection-heading {
    width: 100%;
    box-sizing: border-box;

    padding: 110px 6vw 0;

    margin-bottom: 20px;

    display: flex;

    justify-content: flex-end;

    align-items: baseline;
    position: relative;
    z-index: 20;
    isolation: isolate;
}
.collection-title {
    display: block;
    height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;

}

.collection-title[src*="HF Title"] {
    height: 190px;
}

.collection-title[src*="FL Title"] {
    height: 190px;
}

.collection-number {
    font-family: "Courier New", monospace;

    font-size: 11px;

    color: var(--secondary);
}

/* =========================================================
   GALLERY
========================================================= */

.artwork-gallery {
    width: 100%;

    position: relative;
}

/* =========================================================
   ARTWORK STAGE
========================================================= */

.artwork-stage {
    width: 100%;

    height: 62vh;

    min-height: 450px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 3vw;

    overflow: hidden;

    position: relative;

    touch-action: pan-y;
}

/* =========================================================
   MAIN ARTWORK
========================================================= */

.main-artwork {
    width: min(55vw, 760px);

    height: 58vh;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

    z-index: 5;

    transition:
        opacity 500ms ease,
        transform 600ms cubic-bezier(.22,.61,.36,1);
}
.main-artwork img {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    display: block;
}

/* =========================================================
   SIDE ARTWORKS
========================================================= */

.side-artwork {
    width: min(15vw, 220px);

    height: 42vh;

    min-height: 260px;

    border: none;

    background: transparent;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    transition: opacity 400ms ease, transform 600ms cubic-bezier(.22,.61,.36,1);

    flex-shrink: 0;
}
.side-artwork img {
    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;

    filter:grayscale(100%) contrast(140%) brightness(.35);
}

/* =========================================================
   INFORMATION
========================================================= */

.artwork-information {
    width: min(760px, 55vw);

    margin: 35px auto 0;

    text-align: left;

    position: relative;

    min-height: 150px;
}
.artwork-information h2 {
    font-family: "Courier New", serif;

    font-size: 2rem;

    font-weight: 400;

    letter-spacing: 2px;

    margin-bottom: 6px;
}
.artwork-meta {
    font-family: "Courier New", monospace;

    font-size: 11px;

    color: var(--secondary);

    margin-bottom: 18px;
}

/* =========================================================
   NAVIGATION
========================================================= */

.gallery-navigation {
    width: min(760px, 55vw);

    margin: 35px auto 0;

    display: flex;

    justify-content: space-between;
}
.gallery-navigation button {
    border: none;

    background: transparent;

    color: var(--text);

    font-family: "Courier New", monospace;

    font-size: 10px;

    letter-spacing: 1px;

    padding: 8px 0;

    transition: opacity 250ms ease;
}
.gallery-navigation button:hover {
    opacity: .5;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .collection-page {
        padding-top: 110px;
    }
    .collection-heading {
        padding: 110px 6vw 0;

        margin-bottom: 25px;
    }
    .collection-heading h1 {
        font-size: 3rem;
    }
    .collection-number {
        font-size: 8px;
    }
    .artwork-stage {
        height: 55vh;

        min-height: 380px;

        gap: 8vw;
    }
    .main-artwork {
        width: 70vw;

        height: 50vh;
    }
    .side-artwork {
        position: absolute;

        width: 18vw;

        height: 35vh;

        opacity: .2;
    }
    .previous-artwork {
        left: -7vw;
    }
    .next-artwork {
        right: -7vw;
    }
    .artwork-information {
        width: 70vw;

        margin-top: 25px;
    }
    .artwork-information h2 {
        font-size: 1.6rem;

    }
    .gallery-navigation {
        width: 70vw;

        margin-top: 30px;
    }
}

/* =========================================================
   FULLSCREEN IMAGE VIEWER
========================================================= */

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 99990;

    display: none;
    align-items: center;
    justify-content: center;

    background: #111;
    color: #eee9d9;
}

.image-viewer.is-open {
    display: flex;
}

.viewer-content {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: auto;
    padding: 70px 90px 100px;
    box-sizing: border-box;
}

.viewer-content img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
    transform-origin: center;

    transition: transform 200ms ease;
}

.viewer-close,
.viewer-arrow,
.viewer-controls button {
    border: none;
    background: transparent;
    color: #eee9d9;

    font-family: "Courier New", monospace;
    cursor: pointer;
}

.viewer-close {
    position: absolute;
    top: 24px;
    right: 30px;

    font-size: 36px;
    line-height: 1;
    z-index: 2;
}

.viewer-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    padding: 15px;
    font-size: 28px;
    z-index: 2;

    transition: opacity 200ms ease;
}

.viewer-previous {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-close:hover,
.viewer-arrow:hover,
.viewer-controls button:hover {
    opacity: 0.5;
}

.viewer-controls {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 8px 16px;
    border: 1px solid rgba(238, 233, 217, 0.16);
    border-radius: 30px;
    background: rgba(17, 17, 17, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    color: #eee9d9;
    font-family: "Courier New", monospace;
    font-size: 12px;

    z-index: 10;
    white-space: nowrap;
}

.viewer-controls button {
    min-width: 28px;
    min-height: 28px;
    padding: 4px;

    border: none;
    background: transparent;
    color: #eee9d9;

    font-size: 18px;
    cursor: pointer;
}

.viewer-controls button:hover {
    opacity: 0.6;
}

#viewerZoomReset {
    font-size: 10px;
    letter-spacing: 1px;
}

.viewer-caption {
    position: absolute;
    bottom: 31px;
    left: 30px;

    max-width: 30%;
    overflow-wrap: anywhere;

    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: #bebeb8;

    z-index: 2;
}

@media (max-width: 768px) {
    .viewer-content {
        padding: 80px 35px 110px;
    }

    .viewer-previous {
        left: 0;
    }

    .viewer-next {
        right: 0;
    }

    .viewer-arrow {
        padding: 8px;
        font-size: 22px;
    }

    .viewer-close {
        top: 18px;
        right: 18px;
    }

    .viewer-caption {
        left: 15px;
        bottom: 25px;
        max-width: 32%;
        font-size: 9px;
    }

    .viewer-controls {
        bottom: 18px;
        gap: 8px;
    }
}

/* =========================================================
   BORDERLESS MAGNIFICATION LENS
========================================================= */

.magnifier-lens {
    position: fixed;
    left: 0;
    top: 0;

    width: 240px;
    height: 240px;

    border: none;
    border-radius: 50%;
    overflow: hidden;

    pointer-events: none;
    z-index: 100001;

    display: block;
    visibility: hidden;
    opacity: 0;

    transform: translate(-50%, -50%) scale(0.65);
    transform-origin: center;

    background: #111;

    transition:
        opacity 220ms ease,
        transform 280ms cubic-bezier(.22, .61, .36, 1),
        visibility 280ms;
}

.magnifier-lens.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.magnifier-lens img {
    position: absolute;
    display: block;

    max-width: none !important;
    max-height: none !important;
    width: auto;
    height: auto;

    object-fit: fill;
    transform: none !important;
    transform-origin: top left;
}

body.magnifier-active .custom-cursor {
    opacity: 0 !important;
}

.image-viewer.is-open #viewerImage {
    cursor: none;
}

@media (hover: none), (pointer: coarse) {
    .magnifier-lens {
        display: none !important;
    }

    body.magnifier-active .custom-cursor {
        opacity: 1 !important;
    }

    .image-viewer.is-open #viewerImage {
        cursor: auto;
    }
}
@media (max-width: 600px) {
    .viewer-controls {
        bottom: 12px;
        right: 12px;
        left: auto;
        transform: none;
        padding: 6px 9px;
        gap: 8px;
        max-width: calc(100vw - 24px);
    }

    .viewer-controls button {
        padding: 4px;
        font-size: 16px;
    }

    #viewerZoomLevel {
        font-size: 11px;
        min-width: 34px;
        text-align: center;
    }

    #viewerZoomReset {
        font-size: 9px;
    }
}
#artworkTitle.japanese-title {
    font-family: "Noto Serif JP", serif;
    letter-spacing: 0.05em;
    font-size: 1.4rem;
}