/* The project "walk" page (/work/).
   Mobile first: a normal vertical page. On screens that are wide and
   tall enough (see the media query below) it becomes a horizontal walk:
   the page scrolls vertically, and walk.js slides the track sideways. */

:root {
    --walk-green: rgb(230, 237, 230);
    --walk-red: #B51515;
    --walk-blue: #0B28A0;
    --walk-ink: #404040;
    --walk-nav-w: 260px;
    --walk-head-h: 76px; /* height of the header on wide screens */
}

.walk-page {
    background: #fff;
}

/* ---------- Header: the site name, centered at the top ---------- */

/* styles.css styles every <header> for the front page (150px tall,
   big padding), so reset that here. */
.walk-page header.walk-header {
    height: auto;
    padding: 18px 16px 14px;
    text-align: center;
    background: #fff;
}

.walk-home {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.1;
    color: var(--walk-ink);
}

.walk-home span {
    color: var(--walk-red);
}

.walk-home:hover {
    text-decoration: none;
    color: var(--walk-ink);
}

/* ---------- Navigation (a vertical list on mobile) ---------- */

.walk-nav {
    background: #fff;
    padding: 0 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    margin-bottom: 24px;
}

.walk-label {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #666;
}

.walk-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.walk-links a {
    display: block;
    padding: 7px 0 7px 14px;
    color: var(--walk-ink);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.3;
    border-left: 2px solid transparent;
    transition: color .3s, border-color .3s;
}

.walk-links a:hover {
    color: var(--walk-blue);
    text-decoration: none;
}

.walk-links a[aria-current="true"] {
    color: var(--walk-red);
    border-color: var(--walk-red);
}

/* About / Exhibitions / Contact: only three, so a row is fine */
.walk-links-site {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, .12);
}

.walk-links-site a {
    padding-left: 0;
    border-left: 0;
}

.walk-progress {
    display: none;
}

/* ---------- Sections and panels (vertical on mobile) ---------- */

.walk-section {
    padding: 0 0 48px;
}

/* On phones the menu above already says "Projects", so the opening
   panel only pushes the first project down. It returns on desktop. */
.walk-intro {
    display: none;
}

.panel-title {
    background: var(--walk-green);
    padding: 40px 16px 32px;
    margin-bottom: 24px;
}

.panel-title h1,
.panel-title h2 {
    font-size: 40px;
    line-height: 1.05;
    margin-bottom: .4em;
}

.medium {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--walk-ink);
}

.walk-hint {
    display: none;
}

.panel-text,
.panel-media {
    margin: 0 16px 24px;
}

.panel-text h2 {
    font-size: 24px;
}

.panel-media img {
    display: block;
    width: 100%;
    height: auto;
}

figcaption {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
}

/* Video: a local poster image with a play button until pressed */
.video-facade,
.video-frame {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}

.panel-video .video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: none;
}

.video-facade .play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(181, 21, 21, .9);
    transition: transform .3s, background .3s;
}

.video-facade .play::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 24px;
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent #fff;
}

.video-facade:hover .play,
.video-facade:focus-visible .play {
    transform: scale(1.08);
    background: var(--walk-blue);
}

.exhibitions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exhibitions li {
    margin-bottom: .8em;
    line-height: 1.4;
}

.panel-form {
    position: relative; /* the form's pop-up messages cover this panel */
}

.walk-page footer.walk-footer {
    height: auto;
    display: block;
    padding: 0 16px;
    margin-top: 24px;
}

/* "Launch" links to full-screen pieces ({% launch %} shortcode) */
.launch {
    margin: 0 0 .6em;
}

.launch a {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 22px;
    color: var(--walk-red);
}

.launch a:hover,
.launch a:focus-visible {
    color: var(--walk-blue);
}

/* Text for screen readers only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* "Menu" button (phones): hidden until walk.js adds .is-visible */
.walk-menu-button {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    padding: 10px 16px;
    border-radius: 22px;
    background: var(--walk-red);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .3s, transform .3s, background .3s;
}

.walk-menu-button.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.walk-menu-button:hover,
.walk-menu-button:focus-visible {
    color: #fff;
    text-decoration: none;
    background: var(--walk-blue);
}

/* Images come into focus as they arrive on screen. walk.js adds
   .walk-focus to <html> (only if the visitor hasn't asked for reduced
   motion), so without JavaScript images simply show sharp. */
.walk-focus .panel-media img {
    /* Blurred and in black and white until it comes into view. Both
       states list the same filters in the same order, so the browser
       can fade each one smoothly: sharpening and coloring together. */
    filter: blur(16px) grayscale(1);
    transition: filter 1.4s ease-out, box-shadow .3s;
}

.walk-focus .panel-media .video-facade,
.walk-focus .panel-media .video-frame {
    transition: box-shadow .3s;
}

/* Once in focus, the drop shadow (wide screens) fades in after the
   blur has nearly cleared: the "1.2s" is a delay before it starts. */
.walk-focus .panel-media.is-focused img {
    filter: blur(0) grayscale(0);
    transition: filter 1.4s ease-out, box-shadow 1s ease-out 1.2s;
}

.walk-focus .panel-media.is-focused .video-facade,
.walk-focus .panel-media.is-focused .video-frame {
    transition: box-shadow 1s ease-out 1.2s;
}

/* ---------- The horizontal walk (wide, tall screens) ---------- */

@media (min-width: 900px) and (min-height: 600px) {

    .walk-menu-button {
        display: none;
    }

    /* Header fixed across the top, name centered */
    .walk-page header.walk-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 3;
        height: var(--walk-head-h);
        box-sizing: border-box;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
    }

    .walk-home {
        font-size: 36px;
    }

    /* Left sidebar, below the header */
    .walk-nav {
        position: fixed;
        top: var(--walk-head-h);
        bottom: 0;
        left: 0;
        z-index: 2;
        width: var(--walk-nav-w);
        box-sizing: border-box;
        margin: 0;
        padding: 32px 28px 28px;
        display: flex;
        flex-direction: column;
        border-bottom: 0;
        box-shadow: 1px 0 0 rgba(0, 0, 0, .12);
        overflow-y: auto;
    }

    .walk-label {
        margin-bottom: 8px;
    }

    .walk-links a {
        font-size: 16px;
    }

    .walk-links-site {
        display: block;
        margin-top: 24px;
        padding-top: 16px;
    }

    .walk-links-site a {
        padding-left: 14px;
        border-left: 2px solid transparent;
    }

    .walk-progress {
        display: block;
        margin-top: auto;
        height: 2px;
        background: rgba(0, 0, 0, .1);
    }

    .walk-progress span {
        display: block;
        width: 0;
        height: 100%;
        background: var(--walk-red);
    }

    /* The pinned frame and the sliding track */
    .walk {
        margin-left: var(--walk-nav-w);
        margin-top: var(--walk-head-h);
        position: relative; /* walk.js sets its height */
    }

    /* The frame that stays put below the header while the track slides */
    .walk-pin {
        position: sticky;
        top: var(--walk-head-h);
        height: calc(100vh - var(--walk-head-h));
        overflow: clip;
    }

    .walk-track {
        display: flex;
        height: 100%;
        will-change: transform;
    }

    /* walk.js handles all positioning here; stop the browser's own
       #hash jump and scroll anchoring from nudging the scroll position */
    .walk-page {
        overflow-anchor: none;
    }

    .walk-intro {
        display: flex;
    }

    .walk-section {
        scroll-margin-top: 0;
        flex: none;
        display: flex;
        align-items: center;
        gap: 56px;
        height: 100%;
        padding: 0 80px 0 0;
        box-sizing: border-box;
    }

    .panel {
        flex: none;
        margin: 0;
    }

    /* Each section opens with a full-height green slab */
    .panel-title {
        align-self: stretch;
        width: 400px;
        box-sizing: border-box;
        padding: 0 44px;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .panel-title h1,
    .panel-title h2 {
        font-size: 44px;
    }

    /* The opening panel sits on white so it doesn't merge with the sidebar */
    .walk-intro .panel-title {
        width: 520px;
        padding-left: 72px;
        background: transparent;
    }

    .walk-intro .panel-title h1 {
        font-size: 72px;
    }

    .walk-hint {
        display: block;
        margin-top: 2em;
        font-size: 14px;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--walk-red);
    }

    /* Text columns are (at least) as tall as the images, so every column
       starts at the same line as the pictures (text sits at the top of
       its box). Panels are still centered, so the boxes all line up. */
    .panel-text {
        width: 420px;
        min-height: min(68vh, 760px);
        max-height: 80vh; /* on short screens a long column may grow a little */
        overflow-y: auto;
    }

    /* Short text, the contact form and the exhibitions list (a column
       on its own) keep their own height, so they stay in the middle. */
    .panel-short,
    .panel-form,
    .panel-wide {
        min-height: 0;
    }

    /* A line or two of text: only as wide as it needs to be, and
       sitting closer to the panel that follows it (24px instead of the
       usual 56px gap), since it usually introduces that panel. */
    .panel-short {
        width: auto;
        max-width: 240px;
    }

    .panel-short:not(:last-child) {
        margin-right: -32px;
    }

    .panel-wide {
        width: 520px;
    }

    .panel-media img {
        width: auto;
        height: min(68vh, 760px);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
    }

    /* No shadow until the image has come into focus */
    .walk-focus .panel-media:not(.is-focused) img,
    .walk-focus .panel-media:not(.is-focused) .video-facade,
    .walk-focus .panel-media:not(.is-focused) .video-frame {
        box-shadow: none;
    }

    /* A small image (like the About photo): its box is as tall as the
       text columns, so the image sits at the top, level with the text. */
    .panel-small {
        height: min(68vh, 760px);
    }

    .panel-small img {
        height: auto;
        width: 440px;
    }

    .panel-video .video-facade,
    .panel-video .video-frame {
        width: min(56vw, calc(68vh * 16 / 9));
        box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
    }

    .walk-page footer.walk-footer {
        width: 220px;
        align-self: flex-end;
        padding: 0 0 40px;
    }

    .walk-footer p {
        font-size: 13px;
        color: #666;
    }
}

/* Short desktop screens (laptops with little height): slightly wider
   columns and smaller text, so the longest columns still fit. */
@media (min-width: 900px) and (min-height: 600px) and (max-height: 760px) {
    .panel-text {
        width: 460px;
    }

    .panel-wide {
        width: 600px;
    }

    .panel-text p,
    .panel-text li,
    .panel-text blockquote {
        font-size: 16px;
        line-height: 1.45;
    }
}
