/* UI layer (always on top) */
.top-left,
.top-right,
#cvBtn,
#openVideoBtn,
.artist-name,
.headline-block,
.start-callout {
    position: absolute; /* keep your current positioning behavior */
    z-index: 20; /* above flowers/character */
}
/* =========================================================
   YOUTUBE MODAL
   Shows Blue foot booby video
   ========================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);

    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 9999;
}

.modal-backdrop[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: min(900px, 92vw);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.modal-title {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.close-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border: 0;
}

/* =========================================================
   TYPOGRAPHY – EXHIBITION SHADOW SYSTEM
   Matches reference (outline + depth)
   ========================================================= */

.character-group .artist-name {
    text-shadow: 1px 0 0 rgba(0, 0, 0, 0.75),
    -1px 0 0 rgba(0, 0, 0, 0.75),
    0 1px 0 rgba(0, 0, 0, 0.75),
    0 -1px 0 rgba(0, 0, 0, 0.75),
    1px 1px 0 rgba(0, 0, 0, 0.75),
    -1px 1px 0 rgba(0, 0, 0, 0.75),
    1px -1px 0 rgba(0, 0, 0, 0.75),
    -1px -1px 0 rgba(0, 0, 0, 0.75),
    2px 0 0 rgba(0, 0, 0, 0.35),
    -2px 0 0 rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 -2px 0 rgba(0, 0, 0, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.45);
}

.exhibition-title {
    text-shadow: /* Smooth outline ring (8 directions, tighter) */ 1px 0 0 rgba(0, 0, 0, 0.80),
    -1px 0 0 rgba(0, 0, 0, 0.80),
    0 1px 0 rgba(0, 0, 0, 0.80),
    0 -1px 0 rgba(0, 0, 0, 0.80),
    1px 1px 0 rgba(0, 0, 0, 0.80),
    -1px 1px 0 rgba(0, 0, 0, 0.80),
    1px -1px 0 rgba(0, 0, 0, 0.80),
    -1px -1px 0 rgba(0, 0, 0, 0.80),
        /* Second ring (softer) */ 2px 0 0 rgba(0, 0, 0, 0.45),
    -2px 0 0 rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 -2px 0 rgba(0, 0, 0, 0.45),
    2px 2px 0 rgba(0, 0, 0, 0.45),
    -2px 2px 0 rgba(0, 0, 0, 0.45),
    2px -2px 0 rgba(0, 0, 0, 0.45),
    -2px -2px 0 rgba(0, 0, 0, 0.45),
        /* Continuous fade (blurred “air” shadow) */ 0 10px 18px rgba(0, 0, 0, 0.35),
    0 24px 60px rgba(0, 0, 0, 0.50);
}

.date-range {
    font-size: clamp(26px, 5vw, 66px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-block; /* ensures transform applies cleanly */
    transform: translateX(-2.75em);
    opacity: 0.98;
    text-shadow: 1px 0 0 rgba(0, 0, 0, 0.70),
    -1px 0 0 rgba(0, 0, 0, 0.70),
    0 1px 0 rgba(0, 0, 0, 0.70),
    0 -1px 0 rgba(0, 0, 0, 0.70),
    1px 1px 0 rgba(0, 0, 0, 0.70),
    -1px 1px 0 rgba(0, 0, 0, 0.70),
    1px -1px 0 rgba(0, 0, 0, 0.70),
    -1px -1px 0 rgba(0, 0, 0, 0.70),
    0 10px 28px rgba(0, 0, 0, 0.45);
}



/* =========================================================
   CALLOUT – BASE RESET (prevents “mobile styles leaking”)
   ========================================================= */
.start-callout {
    position: absolute;
    z-index: 6;
    user-select: none;
}

/* =========================================================
   MUSEUM WALK: HORIZONTAL SCROLL (desktop) + VERTICAL (mobile)
   ========================================================= */

/* Desktop: horizontal rooms + visible scrollbar */
@media (min-width: 769px) {
    /* =========================================================
       FOYER – FOREGROUND IMAGERY (REAL ASSETS)
       - Behind text
       - In front of background
       ========================================================= */
    .foyer-foreground {
        position: absolute;
        inset: 0;
        pointer-events: none;
        overflow: hidden;


        /* Layering */
        z-index: 2;
    }

    /* =========================================================
       FOYER – FOREGROUND IMAGERY (FIXED SCALE + SLIDING OVERLAP)
       - No scaling while resizing (within a breakpoint)
       - Desktop = larger
       - Mobile/tablet = smaller
       - Opacity is identical across breakpoints
       ========================================================= */
    /* Group moves exactly like the character used to move */
    /* Character group = anchor frame for character + artist name */
    .character-group {
        position: absolute;
        left: 10%;
        bottom: 0;

        height: 95vh;

        /* make width be defined by its content */
        display: inline-block;

        z-index: 2;

        --head-x: 78.5%;
        --head-y: 9.6%;
        --name-offset-x: 10px;

        /* keep your slide if you use it */
        transform: translateX(clamp(0px, calc((1280px - 100vw) * 0.08), 60px));
    }

    .character-image {
        height: 100%;
        width: auto;
        display: block; /* removes baseline gap */

        position: relative; /* NOT absolute */
        pointer-events: none;
        opacity: 1;
    }

    .character-group .character-image {
        position: relative;
        height: 100%; /* always fill the 80vh group */
        width: auto; /* keep aspect ratio */

        max-width: none; /* disable img { max-width:100% } */
        max-height: none; /* disable any max-height caps */

        display: block;
    }

    .character-group .artist-name {
        position: absolute;
        left: calc(var(--head-x) + var(--name-offset-x)) !important;
        top: var(--head-y) !important;

        transform: rotate(-1deg);
        transform-origin: left center;

        z-index: 20; /* above character */
        white-space: nowrap;

        font-size: clamp(28px, 3.4vw, 60px);
        font-weight: 900;
        line-height: 1.02;
        letter-spacing: -0.02em;
    }

    /* Same opacity everywhere (do NOT override in mobile) */
    .character-image,
    .flowers-image {
        opacity: 1;
    }

    /* ---------- FLOWERS (bigger fixed size + slides behind character) ---------- */
    .flowers-image {
        position: absolute;
        right: -1%;
        bottom: 0;

        /* Height drives scale */
        height: 100%;
        width: auto;

        /*
          Allow the image to visually grow wider on large screens.
          max-height ensures it always fills vertically,
          min-width ensures it doesn’t feel too skinny on ultrawide displays.
        */
        min-width: clamp(900px, 60vw, 1600px);

        display: block;
        pointer-events: none;
        z-index: 1;

        /* Keep your horizontal slide behavior */
        transform: translateX(
            clamp(-620px, calc((100vw - 1280px) * 0.65), 0px)
        );
    }
}


/* =========================================================
   FOYER: BUTTONS + TYPOGRAPHY POSITIONING (matches comp)
   ========================================================= */
.foyer-inner {
    position: relative;
    width: 100%;
    height: 100vh;
}

/* Make BOTH corner containers identical */
.top-left,
.top-right {
    position: absolute;
    top: clamp(18px, 2.2vw, 28px);
    display: block;
    line-height: 0;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 0;
    margin: 0;
}

.top-left {
    left: clamp(18px, 2.2vw, 28px);
}

.top-right {
    right: clamp(18px, 2.2vw, 28px);
}

/* =========================================================
   ICON BUTTONS – CLEAN (NO OUTLINE)
   ========================================================= */
.icon-btn {
    width: 72px; /* larger click target */
    height: 72px;

    border: none;
    background-color: transparent;
    border-radius: 0;

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

    cursor: pointer;
    text-decoration: none;

    box-shadow: none;
    transition: transform 120ms ease, opacity 120ms ease;
}

.icon-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.icon-btn:active {
    transform: translateY(0) scale(0.98);
}

.icon-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
}

#openVideoBtn,
.top-right .icon-btn {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 0;
    background-color: transparent; /* does NOT remove background-image */
}

/* Remove browser button chrome without affecting your inner icon */
#openVideoBtn {
    appearance: none;
    -webkit-appearance: none;
}

/* =========================================================
   BOOBY BUTTON – WINDING OUTLINE (SVG)
   ========================================================= */

.booby-btn {
    position: relative;
    width: 72px; /* button size (adjust if needed) */
    height: 72px;
    padding: 0;
    z-index: 100;
}

/* The winding outline wrapper */
.booby-outline {
    position: absolute;
    inset: -69px; /* space around icon */
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

.booby-outline svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* The actual logo icon */
.booby-icon {
    position: relative;
    z-index: 1;

    width: 72px;
    height: 72px;

    display: block;
    background: url("../assets/img/foyer/icons/logo.png") center / 92% no-repeat;
}

/* CV button */
.top-right .icon-btn {
    background-image: url("../assets/img/foyer/icons/CV.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90%; /* much bigger */
}

@media (min-width: 769px) {
    /* Big title anchored low + centered */
    .headline-block {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: clamp(70px, 27vh, 210px);
        z-index: 4;
        text-align: center;
        width: min(1200px, 94vw);
        text-shadow: 0 22px 65px rgba(0, 0, 0, 0.45);
    }

    .exhibition-title {
        margin: 0;
        font-size: clamp(56px, 9vw, 150px);
        font-weight: 900;
        line-height: 0.95;
        letter-spacing: -0.02em;
        text-transform: uppercase;
        white-space: nowrap;
        max-width: 100%;
        overflow: visible;
    }

    .date-range {
        font-size: clamp(26px, 5vw, 66px);
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        display: inline-block; /* ensures transform applies cleanly */
        transform: translateX(-2.75em);
        opacity: 0.98;
    }

    /* =========================================================
       CALLOUT – DESKTOP / TABLET (>= 769px)
       - Bottom-right
       - Arrow points RIGHT
       ========================================================= */
    .start-callout {
        right: clamp(18px, 3vw, 46px);
        bottom: clamp(24px, 4vh, 52px);
        left: auto;

        transform: none;

        display: inline-flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;

        padding-bottom: 0;
    }

    .callout-box {
        padding: 0;

        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: blur(6px);

        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.02em;
        white-space: nowrap;

        color: rgba(255, 255, 255, 0.95);
    }

    /* Arrow RIGHT */
    .callout-arrow {
        width: 54px;
        height: 2px;
        background: rgba(255, 255, 255, 0.55);
        position: relative;
    }

    .callout-arrow::after {
        content: "";
        position: absolute;
        right: -2px;
        top: 50%;

        width: 10px;
        height: 10px;

        border-right: 2px solid rgba(255, 255, 255, 0.55);
        border-top: 2px solid rgba(255, 255, 255, 0.55);

        transform: translateY(-50%) rotate(45deg);
    }
}

/* =========================================================
   MOBILE LAYOUT (<= 768px) — VERTICAL MUSEUM WALK
   Applies to: <div class="room foyer">
   ========================================================= */
@media (max-width: 768px) {
    .foyer-foreground {
        inset: 0;
        z-index: 1;
        pointer-events: none;
    }


    .character-group,
    .character-image,
    .flowers-image {
        transform: none ;
    }

    /* =========================================================
       FOYER
       ========================================================= */
    .foyer {
        background: #01289c;
    }

    .foyer-inner {
        position: relative;
        height: 100vh;
        overflow: hidden;
    }


    /* ---------- TOP ICONS ---------- */
    .top-left,
    .top-right {
        position: absolute;
        top: 16px;
        z-index: 30;
        line-height: 0;
    }

    .top-left {
        left: 14px;
    }

    .top-right {
        right: 14px;
    }

    .icon-btn {
        width: 72px;
        height: 72px;
        padding: 0;
        margin: 0;
        border: 0;
        background: transparent;
    }

    /* Booby button + outline */
    .booby-btn {
        position: relative;
        width: 72px;
        height: 72px;
        z-index: 100;
    }

    /* CV button */
    #cvBtn {
        background: url("../assets/img/foyer/icons/CV.png") center / 92% no-repeat;
    }

    /* ---------- IMAGERY ---------- */
    .flowers-image,
    .character-image {
        opacity: 1;
        pointer-events: none;
    }

    .flowers-image {
        position: absolute;
        right: var(--flowers-right, -50%);
        bottom: 0;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        z-index: 1;
        clip-path: inset(0 50% 0 0);
        height: auto !important;
        max-width: var(--flowers-w, 100%) !important; /* same trigger */
    }


    .character-group {
        position: absolute;
        left: 0 !important;
        bottom: 0;
        top: auto !important;
        transform: none !important;
        z-index: 2;
        max-width: 100%;

        --knee-x: 65%;
        --knee-y: 52%;
    }

    .character-group .artist-name{
        position: absolute;
        left: var(--knee-x) !important;
        top: var(--knee-y) !important;

        transform: rotate(-1deg);
        transform-origin: left center;

        z-index: 20; /* above character */
        white-space: nowrap;

        font-size: clamp(28px, 3.4vw, 60px);
        font-weight: 900;
        line-height: 1.02;
        letter-spacing: -0.02em;
    }

    /* shrink-to-fit inside max-width */
    .character-group .character-image,
    .flowers-image {
        height: auto !important;
        width: auto !important;

        max-width: 100%;     /* same trigger */

        display: block !important;
        object-fit: contain;
        opacity: 1;
        pointer-events: none;
    }

    /* ---------- TYPOGRAPHY ---------- */
    .headline-block {
        position: absolute;
        left: 6%;
        right: 6%;
        bottom: 11%;
        z-index: 20;
        text-align: left;
    }

    .exhibition-title {
        margin: 0;
        font-size: clamp(38px, 10.5vw, 64px);
        line-height: 0.95;
        font-weight: 900;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .date-range {
        margin:0;
        font-size: clamp(18px, 6.2vw, 30px);
        transform: translateX(1.5em);
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        display: inline-block;
    }

    /* Artist name (mobile-specific placement) */
    .artist-name {
        position: absolute;
        right: 7%;
        top: 56vh;
        z-index: 20;

        transform: rotate(-1deg);
        font-size: clamp(18px, 6vw, 30px);
        font-weight: 900;
        white-space: nowrap;
        text-align: right;
    }

    /* ---------- START CALLOUT ---------- */

    .start-callout {
        display: none;
        left: 50%;
        right: auto;
        bottom: 1px; /* sits on the wall line */
        transform: translateX(-50%);
        z-index: 4;

        width: min(86vw, 420px);
        padding: 0 ;
        margin: 0 ;

        /* display: flex; */
        flex-direction: column;
        align-items: center;
        gap: 0.5vh;
    }

    .callout-box {
        width: 100%;
        padding: 12px 16px;
        border-radius: 10px;
        border: 2px solid rgba(255, 255, 255, 0.45);
        backdrop-filter: blur(6px);
        background: rgba(0, 0, 0, 0.10);
        text-align: center;
        white-space: nowrap;
    }

    .callout-arrow {
        width: 2px;
        height: 3vh;
        background: rgba(255, 255, 255, 0.55);
        position: relative;
    }

    .callout-arrow::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 1px;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        border-right: 2px solid rgba(255, 255, 255, 0.55);
        border-bottom: 2px solid rgba(255, 255, 255, 0.55);
    }

    .foyer-inner::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.35);
        z-index: 5;
        pointer-events: none;
    }

    /* ---------- SAFETY: UI always above imagery ---------- */
    .headline-block,
    .artist-name,
    .start-callout,
    .top-left,
    .top-right {
        z-index: 30;
    }
}

/* =========================================================
   ROOM 2 – SHARED
   ========================================================= */
.room .teaser {
    background: #01289c;
}

.teaser-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.teaser-headline {
    position: absolute;
    inset: 0;

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

    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;

    color: #ffffff;

    /* Big, poster-like scale */
    font-size: clamp(36px, 8vw, 120px);
    line-height: 1;
    letter-spacing: -0.02em;

    /* Match your exhibition text shadow language */
    text-shadow:
        1px  0   0 rgba(0,0,0,0.75),
        -1px  0   0 rgba(0,0,0,0.75),
        0    1px  0 rgba(0,0,0,0.75),
        0   -1px  0 rgba(0,0,0,0.75),
        0 18px 48px rgba(0,0,0,0.45);

    z-index: 10;
}
