* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #1a1a1a;
    color: #f6f6f6;
    font-family: 'JetBrains Mono', monospace;
}

body {
    overflow-x: hidden;
}

/* Hide scrollbar */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Wall background — single image, no repeat */
.exhibit {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    /* Relative to this stylesheet's URL (/<base>/exhibit/exhibit.css) so it
       resolves correctly under the Webflow Cloud mount path. */
    background:
        linear-gradient(180deg, #202020 36.73%, rgba(32, 32, 32, 0.790111) 52.46%, rgba(32, 32, 32, 0) 75.08%),
        #1a1a1a url('images/wall-30.webp') no-repeat center center / cover;
}

/* Header */
.exhibit-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 30px;
    z-index: 100;
}

.logo {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: rgba(255, 255, 255, 0.5);
}

/* Scroll hint */
.scroll-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    z-index: 200;
    pointer-events: none;
}

@media (max-width: 768px) {
    .scroll-hint {
        display: none;
    }
}

/* Desktop drag affordance: a custom "DRAG" pill cursor follows the pointer,
   so we hide the native cursor over the pannable wall. */
@media (min-width: 769px) {
    .exhibit {
        cursor: none;
    }
}

/* Custom drag cursor — only rendered on desktop via JS. */
.drag-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: none; /* toggled to block by JS on desktop */
    pointer-events: none;
    transform: translate(-50%, -50%) scale(var(--drag-cursor-scale, 0.6));
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    will-change: transform;
    filter: drop-shadow(0 6px 16px rgba(20, 120, 50, 0.3));
}

.drag-cursor svg {
    display: block;
}

.drag-cursor.is-visible {
    opacity: 1;
    --drag-cursor-scale: 1;
}

.drag-cursor.is-dragging {
    --drag-cursor-scale: 0.9;
}

/* Direction arrows fade out when the wall can't pan that way any further. */
.drag-arrow {
    transition: opacity 0.18s ease;
}
/* Left arrow stays hidden until the user actually pans (the auto-hint nudge
   moves the wall, so we can't rely on at-start alone). */
.drag-cursor:not(.armed) .drag-arrow-left,
.drag-cursor.at-start .drag-arrow-left,
.drag-cursor.at-end .drag-arrow-right {
    opacity: 0;
}

/* Container */
.container {
    height: 100%;
    width: max-content;
    will-change: transform;
}

.medias {
    position: relative;
}

/* Media items */
.media-item {
    position: absolute;
    cursor: default;
    will-change: transform;
    transition: z-index 0s;
}

.media-item:has(.info-icon:hover) {
    z-index: 50 !important;
}

/* Question-mark info icon — the actual hover/click target for items
   with real content. Positioned absolutely inside the media item. */
.info-icon {
    position: absolute;
    z-index: 20;
    cursor: pointer;
    pointer-events: auto;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
    transition: transform 0.2s ease, filter 0.2s ease;
    transform-origin: center;
    user-select: none;
}

.info-icon:hover {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)) brightness(1.15);
}

/* Decorative items (e.g. clip overlays in the manual layout) — non-interactive */
.media-item[data-decorative] {
    cursor: default;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.media-item[data-decorative]:hover {
    z-index: inherit !important;
}

.media-item[data-decorative]:hover img:not(.clip) {
    transform: none;
}

.media-item img:not(.clip) {
    display: block;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.media-item:has(.info-icon:hover) img:not(.clip) {
    transform: scale(1.05);
}

/* Clip — real green clip image at random edge positions */
.clip {
    position: absolute;
    width: 50px;
    height: auto;
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Default: top center */
.clip { top: -12px; left: 50%; transform: translateX(-50%) rotate(0deg); }

/* Position variants set by JS via data-clip-pos */
.clip[data-clip-pos="top-left"]     { top: -12px; left: 10%;  transform: rotate(-8deg); }
.clip[data-clip-pos="top-center"]   { top: -12px; left: 50%;  transform: translateX(-50%) rotate(0deg); }
.clip[data-clip-pos="top-right"]    { top: -12px; right: 10%; left: auto; transform: rotate(6deg); }
.clip[data-clip-pos="left"]         { top: 15%;  left: -18px; transform: rotate(-90deg); }
.clip[data-clip-pos="right"]        { top: 15%;  right: -18px; left: auto; transform: rotate(90deg); }
.clip[data-clip-pos="bottom-left"]  { bottom: -10px; top: auto; left: 15%;  transform: rotate(180deg); }
.clip[data-clip-pos="bottom-right"] { bottom: -10px; top: auto; right: 15%; left: auto; transform: rotate(175deg); }

/* Tooltip (desktop) */
.tooltip {
    position: fixed;
    background: #202020;
    border-radius: 0;
    padding: 18px;
    max-width: 320px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    letter-spacing: 0;
    color: #F6F6F6;
    text-transform: uppercase;
}

.tooltip-desc {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
    color: #7B7B7B;
    text-transform: uppercase;
    white-space: normal;
    margin-top: 16px;
}

/* When the description is empty, hide it so the title doesn't leave
   trailing whitespace inside the tooltip box. */
.tooltip-desc:empty {
    display: none;
}

/* Bottom Sheet (mobile) */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 300;
}

.sheet-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #202020;
    border-radius: 20px 20px 0 0;
    padding: 0 24px calc(96px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 400;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.bottom-sheet.visible {
    transform: translateY(0);
}

.sheet-handle {
    width: 32px;
    height: 6px;
    background: #ACACAC;
    border-radius: 50px;
    opacity: 1;
    margin: 15px auto;
}

.sheet-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sheet-image {
    max-width: 100%;
    max-height: 40vh;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.sheet-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 18px;
    line-height: 18px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #F6F6F6;
    margin-bottom: 20px;
}

.sheet-desc {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    color: #7B7B7B;
    margin-bottom: 20px;
    max-width: 320px;
}

.sheet-close {
    display: none;
}

.sheet-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* Hide tooltip on mobile, hide sheet on desktop */
@media (max-width: 768px) {
    .tooltip {
        display: none;
    }

    .media-item:not([data-decorative]) {
        min-width: 80px;
        min-height: 80px;
    }

    .media-item img:not(.clip) {
        /* Mobile sizes handled by JS via mobileScale */
    }

    .clip {
        width: 30px;
    }

    .medias {
        gap: 15px;
    }

    .exhibit-header {
        padding: 20px;
    }

    /* Wall is drag-driven on mobile — take over horizontal touch gestures. */
    .container {
        touch-action: none;
    }
}

@media (min-width: 769px) {
    .bottom-sheet,
    .sheet-overlay {
        display: none;
    }
}

/* Pin size animations */
.gsap-marker-start,
.gsap-marker-end {
    display: none;
}

/* Progress Bar - Mobile only */
.exhibit-progress {
    display: none;
}

@media (max-width: 768px) {
    .exhibit-progress {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: rgba(255, 255, 255, 0.1);
        z-index: var(--z-progress);
    }

    .exhibit-progress-bar {
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, #1DA342 0%, #1CC94C 100%);
        border-radius: 0 2px 2px 0;
        transform-origin: left;
        transform: scaleX(0);
        will-change: transform;
    }
}


/* ==========================================================================
   FOCUS OVERLAY (DESKTOP) — click an image to highlight it.
   Darkens the wall behind, shows the image at scale plus title/desc,
   with an ESC button on the left to close.
   ========================================================================== */

.focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    pointer-events: none;
}

.focus-overlay.visible {
    display: block;
    pointer-events: auto;
}

.focus-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    opacity: 0;
    transition: opacity 0.32s ease;
    cursor: pointer;
}
.focus-overlay.visible .focus-backdrop { opacity: 1; }

.focus-esc {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    padding: 8px 6px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease 0.12s;
}
.focus-overlay.visible .focus-esc { opacity: 1; }

.focus-esc-key {
    font-size: 11px;
    letter-spacing: 0.18em;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
}

.focus-esc-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.focus-esc:hover .focus-esc-key { border-color: #fff; color: #fff; }
.focus-esc:hover .focus-esc-label { color: rgba(255, 255, 255, 0.85); }

.focus-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    display: flex;
    align-items: flex-start;
    gap: 36px;
    max-width: min(1100px, 86vw);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity   0.32s ease;
    z-index: 2;
    pointer-events: none;
}
.focus-overlay.visible .focus-stage {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.focus-image {
    max-height: 70vh;
    max-width: min(540px, 50vw);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

.focus-info {
    flex: 1;
    min-width: 240px;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.78);
    padding-top: 24px;
    pointer-events: auto;
}

.focus-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
    letter-spacing: 0;
    color: #f6f6f6;
    text-transform: uppercase;
    margin: 0 0 18px 0;
}

.focus-desc {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0;
    color: #f6f6f6;
    text-transform: uppercase;
    margin: 0;
}

@media (max-width: 768px) {
    /* Mobile keeps the existing bottom-sheet UX */
    .focus-overlay { display: none !important; }
}


/* ==========================================================================
   TOP SOFT-BLUR — sits below the navbar, fades from blurred at top to
   crisp at the bottom edge so the wall reads softer behind the chrome.
   ========================================================================== */
.exhibit-top-blur {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    z-index: var(--z-fade); /* below navbar (10002) but above the wall */
    pointer-events: none;
    /* Layer 1 — lightest blur across the whole strip + colour gradient in the
       page's own background shade (#1a1a1a). */
    backdrop-filter: blur(2px) saturate(110%);
    -webkit-backdrop-filter: blur(2px) saturate(110%);
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.95) 0%,
        rgba(26, 26, 26, 0.55) 45%,
        rgba(26, 26, 26, 0)    100%
    );
    mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.exhibit-top-blur::before,
.exhibit-top-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
/* Layer 2 — medium blur over the upper two-thirds. */
.exhibit-top-blur::before {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 72%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 72%);
}
/* Layer 3 — strongest blur hugging the very top edge. */
.exhibit-top-blur::after {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(to bottom, #000 0%, #000 12%, transparent 42%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 12%, transparent 42%);
}

@media (max-width: 768px) {
    .exhibit-top-blur {
        height: 96px;
    }
}

/* Soft bottom-blur strip (desktop only) — mirrors the top blur so the wall
   fades softly behind the drag hint / footer at the bottom edge. */
.exhibit-bottom-blur {
    display: none;
}

@media (min-width: 769px) {
    /* Progressive blur: three stacked layers whose blur radius grows toward
       the bottom edge, over a gradient in the page's own background shade
       (#1a1a1a) so the wall melts into the background rather than a black bar. */
    .exhibit-bottom-blur {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 120px;
        z-index: var(--z-fade); /* below navbar/footer but above the wall */
        pointer-events: none;
        /* Layer 1 — lightest blur across the whole strip + colour gradient. */
        backdrop-filter: blur(2px) saturate(110%);
        -webkit-backdrop-filter: blur(2px) saturate(110%);
        background: linear-gradient(
            to top,
            rgba(26, 26, 26, 0.95) 0%,
            rgba(26, 26, 26, 0.55) 45%,
            rgba(26, 26, 26, 0)    100%
        );
        mask-image: linear-gradient(to top, #000 0%, #000 60%, transparent 100%);
        -webkit-mask-image: linear-gradient(to top, #000 0%, #000 60%, transparent 100%);
    }
    .exhibit-bottom-blur::before,
    .exhibit-bottom-blur::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
    }
    /* Layer 2 — medium blur over the lower two-thirds. */
    .exhibit-bottom-blur::before {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        mask-image: linear-gradient(to top, #000 0%, #000 35%, transparent 72%);
        -webkit-mask-image: linear-gradient(to top, #000 0%, #000 35%, transparent 72%);
    }
    /* Layer 3 — strongest blur hugging the very bottom edge. */
    .exhibit-bottom-blur::after {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 42%);
        -webkit-mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 42%);
    }
}

