/* The header logo hangs below the bar: the first section clears it (bar 84 / logo 136 → 52px; mobile 32px). */
:root { --header-hang: 52px; }
@media (max-width: 860px) { :root { --header-hang: 32px; } }
main > section:first-child { padding-top: calc(var(--header-hang) + var(--space-6)); }
main > section.flight:first-child { padding-top: 0; } /* the hanging sign simply hangs over the footage */

/* Public page layouts (home, directory, profile, exhibitions, artwork, open studios, visit). */

.section--tight { padding-block: var(--space-7) var(--space-6); }
.section--flush-top { padding-top: 0; }
.section-title { font-size: var(--text-title); margin-bottom: var(--space-5); }
.section-head h2 { font-size: var(--text-headline); }

/* ── Home ─────────────────────────────────────────────────────── */
.home-hero { padding-block: var(--space-7) var(--space-8); }
.home-hero__inner { display: grid; gap: var(--space-7); align-items: center; grid-template-columns: minmax(0, 1fr); }
.home-hero__text { display: grid; gap: var(--space-5); align-content: center; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.home-hero__media { margin: 0; background: var(--wall); aspect-ratio: 4 / 3; overflow: hidden; }
.home-hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .home-hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }

.feature { background: var(--paper); border: var(--rule); }
.feature__media { display: block; position: relative; background: var(--wall); aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__media--logo img { inset: 15%; width: 70%; height: 70%; object-fit: contain; }
@media (min-width: 900px) { .feature__media { aspect-ratio: auto; min-height: 420px; } }
.feature__title { font-size: var(--text-headline); }
.feature__title a { text-decoration: none; }
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.feature__dates { font-weight: 500; }

.open-band { background: var(--ink); color: var(--on-ink); padding-block: var(--space-6); }
.open-band__inner { display: grid; gap: var(--space-5); align-items: center; grid-template-columns: auto 1fr; }
.open-band__badge { width: 88px; height: auto; }
.open-band h2 { font-size: var(--text-title); color: var(--on-ink); }
.open-band p { color: var(--on-ink-muted); margin-top: var(--space-2); }
.open-band .btn { grid-column: 1 / -1; justify-self: start; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.open-band .btn:hover { background: var(--wall); }
@media (min-width: 800px) {
    .open-band__inner { grid-template-columns: auto 1fr auto; }
    .open-band .btn { grid-column: auto; }
    .open-band__badge { width: 110px; }
}

.visit-band { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .visit-band { grid-template-columns: 1fr 1.4fr auto; align-items: start; } }

/* ── Directory ────────────────────────────────────────────────── */
.directory-tools { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; max-width: 640px; }
.directory-tools__search { flex: 1 1 260px; }
.year-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.year-filter .select { width: auto; min-width: 180px; }
html.js .directory-tools [data-filter-submit] { display: none; } /* the directory filters instantly as you type */
.artist-card[hidden] { display: none; }

/* ── Artist profile ─────────────────────────────────────────────
   Built like a wall label: name on a 2px rule, facts, then the story. */
.profile { display: grid; gap: var(--space-6); margin-top: var(--space-5); }
.profile-hero { padding-bottom: var(--space-9); } /* breathing room before works / neighbours */
@media (max-width: 599px) { .profile-hero { padding-bottom: var(--space-8); } }
.profile__photo { margin: 0; background: var(--wall); aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; max-height: 72svh; }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__photo .artist-card__initials { font-size: clamp(3rem, 10vw, 6rem); }
.profile__body { display: grid; gap: var(--space-6); align-content: start; min-width: 0; }
.profile__label { border-top: 2px solid var(--ink); padding-top: var(--space-4); display: grid; gap: var(--space-2); }
.profile__name { font-size: var(--text-display); line-height: 1.02; letter-spacing: var(--tracking-display, -0.01em); overflow-wrap: anywhere; }
.profile__disc { margin: 0; font-size: var(--text-lead); font-weight: 300; color: var(--muted); }
.profile__facts { gap: var(--space-4) var(--space-6); padding-bottom: var(--space-5); border-bottom: var(--rule); }
.profile__facts dd { font-size: 1.0625rem; }
.profile__facts dd strong { font-weight: 500; }
.profile__facts dd small { font-size: var(--text-meta); margin-top: 2px; }
.open-flag { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 500; color: var(--upcoming-ink); }
.open-flag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--upcoming); }
.profile__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-weight: 500; }
.profile__bio { font-size: 1.0625rem; }
.statement { margin: 0; padding-left: var(--space-5); border-left: 1px solid var(--ink); font-size: 1.125rem; font-weight: 300; max-width: var(--measure); }
.profile__visit { padding: var(--space-5); background: var(--wall); max-width: var(--measure); }
.profile__visit p { margin: 0; }
.profile__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (min-width: 900px) {
    .profile { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: start; }
    .profile__photo { position: sticky; top: calc(var(--header-h, 72px) + var(--space-5)); max-height: none; }
    .profile--no-photo .profile__photo { aspect-ratio: 1; max-width: 320px; }
}
@media (max-width: 599px) {
    .profile { gap: var(--space-5); }
    .profile__facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
    .profile__facts dd + dt { margin-top: var(--space-3); }
    .profile__actions .btn { flex: 1 1 auto; }
}

/* Previous / next artist */
.profile-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-4); padding-block: var(--space-6) var(--space-8); border-top: var(--rule); }
.profile-pager__link { display: grid; gap: var(--space-1); text-decoration: none; min-width: 0; }
.profile-pager__link--next { grid-column: 3; text-align: right; justify-items: end; }
.profile-pager__dir { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-label); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
.profile-pager__dir svg { width: 16px; height: 16px; }
.profile-pager__name { font-size: var(--text-subtitle); font-weight: 500; overflow-wrap: anywhere; }
.profile-pager__link:hover .profile-pager__name { text-decoration: underline; text-underline-offset: 0.2em; }
.profile-pager__all { grid-column: 2; font-weight: 500; font-size: var(--text-meta); }
@media (max-width: 599px) {
    .profile-pager { grid-template-columns: 1fr 1fr; }
    .profile-pager__all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
    .profile-pager__link--next { grid-column: 2; }
}

.show-list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.show-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-4) 0; border-bottom: var(--rule); }
.show-list a { font-weight: 500; font-size: 1.0625rem; }
.show-list .meta { margin-left: auto; }

/* ── Exhibitions ──────────────────────────────────────────────── */
.exhibition-card__cover--logo { background: var(--paper); border: var(--rule); }
.exhibition-card__cover--logo img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; }
.show-hero { display: grid; gap: var(--space-6); margin-top: var(--space-5); align-items: center; grid-template-columns: minmax(0, 1fr); }
.show-hero__dates { font-size: 1.125rem; font-weight: 500; }
.show-hero__media { margin: 0; background: var(--wall); aspect-ratio: 4 / 3; overflow: hidden; }
.show-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.show-hero__media { position: relative; }
.show-hero__media--logo { background: var(--paper); border: var(--rule); }
.show-hero__media--logo img { position: absolute; inset: 15%; width: 70%; height: 70%; object-fit: contain; }
.show-hero--current .show-hero__text { border-top: 6px solid var(--current); padding-top: var(--space-5); }
.show-hero--upcoming .show-hero__text { border-top: 6px solid var(--upcoming); padding-top: var(--space-5); }
@media (min-width: 900px) { .show-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.about-show { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .about-show { grid-template-columns: 1.4fr 1fr; } }
.grid--participants { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.participants { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2) var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.participants a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; text-decoration: none; }
.participants a:hover strong { text-decoration: underline; }
.participants strong { display: block; font-weight: 500; }
.participants__photo { flex: none; width: 56px; height: 56px; background: var(--wall); overflow: hidden; display: grid; place-items: center; font-weight: 500; color: var(--muted); }
.participants__photo img { width: 100%; height: 100%; object-fit: cover; }
.archive-note { margin-top: var(--space-6); }

/* ── Artwork page ─────────────────────────────────────────────── */
.artwork__body { display: grid; gap: var(--space-6); padding-block: var(--space-5) var(--space-7); }
.artwork__label-col, .artwork__story-col { display: grid; gap: var(--space-5); align-content: start; }
.artwork__h2 { font-size: var(--text-subtitle); margin-bottom: var(--space-3); }
.artwork video { width: 100%; height: auto; background: var(--ink); }
.video-frame { aspect-ratio: 16 / 9; background: var(--ink); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.artwork-card__price { font-size: var(--text-meta); font-weight: 500; }
@media (min-width: 900px) {
    .artwork { display: grid; grid-template-columns: 1fr 1fr; }
    .artwork-stage { grid-row: 1 / span 2; align-self: start; position: sticky; top: 81px; --stage-h: calc(100svh - 81px - 80px); --stage-pad: var(--space-7); }
    .artwork__body { grid-template-columns: 1fr; padding: var(--space-8) var(--space-7); max-width: 640px; }
    .artwork > .section { grid-column: 1 / -1; }
}

/* ── Open Studios ─────────────────────────────────────────────── */
.open-hero { display: grid; gap: var(--space-6); align-items: center; }
.open-hero__when { font-size: 1.125rem; }
.open-hero__badge { width: 140px; height: auto; }
@media (min-width: 800px) { .open-hero { grid-template-columns: 1fr auto; } .open-hero__badge { width: 200px; } }
.open-list { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.open-list__building { font-size: var(--text-subtitle); padding-bottom: var(--space-3); border-bottom: 2px solid var(--ink); }
.open-list ul { list-style: none; margin: 0; padding: 0; }
.open-list li { display: flex; gap: var(--space-4); align-items: baseline; padding: var(--space-3) 0; border-bottom: var(--rule); }
.open-list__studio { flex: none; width: 52px; font-size: var(--text-label); font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.open-list a { font-weight: 500; }

/* ── Visit & content pages ────────────────────────────────────── */
.visit-hero { display: grid; gap: var(--space-7); align-items: start; grid-template-columns: minmax(0, 1fr); }
.visit-hero__media, .page-photo { margin: 0; background: var(--wall); overflow: hidden; }
.visit-hero__media img, .page-photo img { width: 100%; height: auto; }
@media (min-width: 900px) { .visit-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.facts--large dd { font-size: 1.0625rem; }
.faq { border-bottom: var(--rule); }

/* ── Contact an artist ───────────────────────────────────────── */
.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); margin-top: var(--space-5); }
.contact__form .field-row { display: grid; gap: var(--space-5); }
@media (min-width: 600px) { .contact__form .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact__who { display: grid; gap: var(--space-5); align-content: start; }
.contact__work, .contact__artist { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-4); align-items: start; text-decoration: none; color: inherit; }
.contact__thumb { aspect-ratio: 1; background: var(--wall); display: grid; place-items: center; overflow: hidden; }
.contact__thumb--portrait { aspect-ratio: 4 / 5; }
.contact__thumb img { width: 100%; height: 100%; object-fit: cover; }
.contact__label .wall-label__title { font-size: var(--text-subtitle); }
.contact__privacy { max-width: 42ch; }
.contact__form { display: grid; gap: var(--space-5); align-content: start; max-width: 640px; }
.contact__reasons { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.artwork__ask { margin: var(--space-5) 0 0; }
@media (max-width: 899px) { .artwork__ask { display: none; } } /* phones use the sticky bar */
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); } }
.profile__actions .btn svg { width: 18px; height: 18px; }

/* ── Home flight (scroll-scrubbed video hero) ───────────────────
   The section is as tall as the flight (set by flight.js); the inner frame sticks under the header. */
.flight { --hdr: 84px; position: relative; background: var(--ink); color: var(--on-ink); }
@media (max-width: 860px) { .flight { --hdr: 64px; } }
.flight__sticky { position: relative; height: calc(100svh - var(--hdr)); min-height: 420px; overflow: hidden; }
.js .flight { height: 640svh; } /* replaced by the real length once flight.js runs */
.js .flight__sticky { position: sticky; top: var(--hdr); }
.flight__stage, .flight__scene { position: absolute; inset: 0; }
.flight__scene { opacity: 0; will-change: opacity; }
.flight__scene:first-child { opacity: 1; }
.flight__scene img, .flight__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.flight__scene img { transform-origin: 50% 55%; will-change: transform; }
.flight__video { z-index: 1; }
.flight__scene.has-video img { opacity: 0; }
.flight__shade {
    position: absolute; inset: 0; z-index: 30; pointer-events: none;
    background: linear-gradient(0deg, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0.35) 34%, transparent 62%),
                linear-gradient(90deg, rgba(10, 10, 10, 0.35) 0%, transparent 55%);
}
.flight__copy { position: absolute; inset: auto 0 0 0; z-index: 40; padding-bottom: clamp(var(--space-7), 9vh, var(--space-9)); }
.flight__beat { display: grid; gap: var(--space-4); max-width: 34rem; padding-top: var(--space-4); border-top: 2px solid var(--on-ink); }
.js .flight.is-live .flight__copy { height: 100%; top: 0; }
.js .flight.is-live .flight__beat { position: absolute; bottom: clamp(var(--space-7), 9vh, var(--space-9)); left: var(--gutter); right: var(--gutter); opacity: 0; will-change: opacity, transform; }
.js .flight.is-live .flight__beat:first-child { opacity: 1; }
.js .flight.is-live .flight__beat.is-off { pointer-events: none; }
.flight__beat + .flight__beat { margin-top: var(--space-7); }
.js .flight.is-live .flight__beat + .flight__beat { margin-top: 0; }
.flight__title { font-size: var(--text-display); line-height: 1.02; letter-spacing: var(--tracking-display); color: var(--on-ink); text-wrap: balance; }
.flight__lead { margin: 0; font-size: var(--text-lead); font-weight: 300; color: rgba(255, 255, 255, 0.88); max-width: 32rem; }
.flight__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-2) 0 0; }
.btn--ghost-on-ink { background: transparent; color: var(--on-ink) !important; border-color: rgba(255, 255, 255, 0.7); text-decoration: none !important; }
.btn--ghost-on-ink:hover { border-color: var(--on-ink); background: rgba(255, 255, 255, 0.08); }
.flight__skip { position: absolute; z-index: 45; right: var(--gutter); bottom: var(--space-5); display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-3); background: rgba(17, 17, 17, 0.72); color: var(--on-ink); font-size: var(--text-meta); font-weight: 500; }
.flight__skip:hover { background: rgba(17, 17, 17, 0.9); }
.flight :focus-visible { outline: 3px solid var(--on-ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); }
.flight__title, .flight__lead { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45); }
.flight__progress { position: absolute; z-index: 45; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.18); }
.flight__progress span { display: block; height: 100%; background: var(--on-ink); transform-origin: 0 50%; transform: scaleX(0); }
#after-flight { scroll-margin-top: var(--hdr, 84px); }
@media (max-width: 860px) {
    .flight__title { font-size: clamp(2.1rem, 9vw, 3rem); }
    .flight__lead { font-size: 1.0625rem; }
    .flight__skip { top: var(--space-4); bottom: auto; }
}
