:root {
  --paper: #f4f6fa;
  --ink: #182126;
  --soft-ink: #586575;
  --line: #c7cfd9;
  --acid: #214aeb;
  --surface: #e5eaf1;
  --header: 6rem;
  --gutter: clamp(1.25rem, 3.2vw, 4rem);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
::selection { background: var(--acid); color: white; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, textarea, select { font: inherit; }
button, .button { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 5px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 400; }
.site-header { height: var(--header); display: flex; justify-content: space-between; align-items: center; margin: 0 var(--gutter); border-bottom: 1px solid var(--ink); position: relative; z-index: 20; }
.wordmark { display: block; position: relative; padding-left: 2rem; font-size: .8rem; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; text-decoration: none; text-transform: uppercase; }
.wordmark::before { content: ""; position: absolute; top: .12rem; left: 0; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--acid); }
.wordmark span { display: block; }
nav { display: flex; gap: clamp(1.2rem, 3vw, 3rem); counter-reset: navigation; }
nav a { display: flex; gap: .5rem; text-decoration: none; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; padding: .75rem 0; }
nav a::before { counter-increment: navigation; content: "0" counter(navigation); font-family: monospace; font-size: .58rem; color: var(--soft-ink); }
nav a.active, nav a:hover { color: var(--acid); }
nav a.active { box-shadow: 0 1px var(--acid); }
.menu-button { display: none; border: 0; background: none; padding: .75rem 0; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
main { min-height: calc(100svh - var(--header) - 5rem); }
main:focus { outline: none; }
.page { padding: clamp(3rem, 5vw, 6rem) var(--gutter) 6rem; animation: reveal .4s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }
.loading, .error { display: grid; min-height: 65svh; place-content: center; gap: 1rem; padding: var(--gutter); color: var(--soft-ink); font-size: .8rem; }
.eyebrow, .home-edition, .announcement-label, .home-caption { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .65rem; line-height: 1.5; letter-spacing: .055em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: .4rem; height: .4rem; background: var(--acid); border-radius: 50%; }

/* A typographic masthead above the gallery's own artwork. */
.home { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(15rem, 1fr); gap: 0 clamp(2rem, 5vw, 6rem); padding-top: 1.5rem; padding-bottom: 2rem; }
.home-intro { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-right: 16rem; gap: 1rem; }
.home-edition { color: var(--soft-ink); }
.home h1 { grid-column: 1 / -1; display: flex; align-items: center; gap: .22em; margin: 1.3rem 0 2rem; color: var(--acid); font-size: clamp(5rem, 13.4vw, 15rem); font-weight: 500; line-height: .84; letter-spacing: -.085em; white-space: nowrap; }
.home-mark { margin-left: auto; font-size: .65em; font-weight: 400; line-height: 1; letter-spacing: 0; }
.home-feature { margin: 0; min-width: 0; }
.home-slides { position: relative; height: clamp(18rem, 43vh, 38rem); background: var(--surface); overflow: hidden; }
.home-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s ease; }
.home-slide.active { opacity: 1; }
.home-caption { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
a.home-caption:hover { color: var(--acid); }
.home-caption > span:last-child { text-align: right; }
.home-art-placeholder { display: flex; align-items: center; justify-content: space-between; padding: 2rem; color: var(--acid); font-size: clamp(2rem, 4vw, 5rem); letter-spacing: -.06em; line-height: 1; }
.home-art-placeholder > span:last-child { font-size: 2em; }
.announcements { display: flex; flex-direction: column; align-items: stretch; border-top: 1px solid var(--ink); }
.announcement-label { padding: .85rem 0 1.8rem; color: var(--soft-ink); }
.announcement { font-size: clamp(1.3rem, 2.1vw, 2.4rem); line-height: 1.15; letter-spacing: -.045em; overflow-wrap: anywhere; }
.announcement p { margin-bottom: 1rem; }
.announcement > a { display: inline-block; font-size: .8rem; letter-spacing: 0; margin-bottom: 1.5rem; }
.announcement + .announcement { border-top: 1px solid var(--line); padding-top: 1rem; }
.home-explore { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: auto; padding: 1.5rem 0 .85rem; border-bottom: 1px solid var(--ink); color: var(--acid); text-decoration: none; font-size: clamp(1.4rem, 2.3vw, 2.5rem); line-height: 1; letter-spacing: -.045em; }
.home-explore > span:last-child { font-size: 2.5em; line-height: .8; transition: transform .2s; }
.home-explore:hover > span:last-child { transform: translate(3px, -3px); }

/* Programme and exhibition pages. */
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(3rem, 6vw, 7rem); }
.page-heading h2, .text-page h2 { margin: 0; color: var(--acid); font-size: clamp(4rem, 10vw, 11rem); line-height: .9; letter-spacing: -.075em; }
.page-heading p { margin: 0; font-family: monospace; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--soft-ink); }
.exhibition-group { margin-bottom: 5rem; }
.exhibition-group > h3 { margin: 0 0 1.5rem; padding-top: 1rem; border-top: 1px solid var(--ink); font-family: monospace; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.exhibition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
.exhibition-card { display: block; text-decoration: none; min-width: 0; }
.exhibition-image { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--surface); }
.exhibition-image img { width: 100%; height: 100%; display: block; object-fit: contain; transition: transform .6s ease; }
.exhibition-card:hover .exhibition-image img { transform: scale(1.025); }
.exhibition-placeholder { height: 100%; display: grid; place-items: center; color: var(--soft-ink); font-size: .9rem; }
.exhibition-number { position: absolute; top: .8rem; left: .8rem; padding: .5rem; background: var(--paper); font: .7rem monospace; }
.exhibition-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.exhibition-info h4 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; letter-spacing: -.045em; }
.exhibition-info small { margin-left: auto; color: var(--soft-ink); font: .65rem/1.6 monospace; text-transform: uppercase; }
.exhibition-artists { flex-basis: 100%; color: var(--soft-ink); font-size: .9rem; }
.empty { grid-column: 1 / -1; padding: 1rem 0; color: var(--soft-ink); font-size: 1rem; }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 7rem); }
.detail-media { min-width: 0; }
.detail-media figure { margin: 0 0 2rem; }
.detail-media img { width: 100%; display: block; }
.detail-media figcaption { margin-top: .7rem; font: .65rem/1.5 monospace; color: var(--soft-ink); }
.detail-media .image-placeholder { height: 50vh; display: grid; place-items: center; background: var(--surface); color: var(--soft-ink); }
.detail-copy { position: sticky; top: 2rem; align-self: start; }
.back { display: inline-block; margin-bottom: 3rem; text-decoration: none; font: .7rem monospace; text-transform: uppercase; }
.detail h2 { margin-bottom: 1.5rem; color: var(--acid); font-size: clamp(3rem, 6.5vw, 7rem); line-height: .95; letter-spacing: -.06em; overflow-wrap: anywhere; }
.artists { font-size: 1.2rem; color: var(--soft-ink); }
.metadata { margin: 2rem 0; padding: 1rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font: .7rem/1.6 monospace; text-transform: uppercase; }
.description, .about-copy { white-space: pre-line; font-size: clamp(1.1rem, 1.6vw, 1.5rem); line-height: 1.5; letter-spacing: -.02em; }
.button { display: inline-block; border: 1px solid var(--acid); background: var(--acid); color: white; padding: 1rem 1.35rem; text-decoration: none; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; transition: background .2s; }
.button:hover { background: #1635b6; }
.button:disabled { cursor: wait; opacity: .6; }

/* Text and forms. */
.text-page { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 10vw; align-content: center; min-height: 70svh; }
.about-copy { max-width: 42rem; }
.social-link { display: inline-flex; align-items: center; gap: 1.5rem; margin-top: 2.4rem; font: .75rem monospace; text-transform: uppercase; text-decoration: none; }
.social-link::after { content: "↗"; font-size: 1.3rem; }
.social-link:hover { color: var(--acid); }
.contact-page { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem 7vw; align-items: start; }
.contact-page .page-heading { margin-bottom: 0; }
.contact-page .page-heading h2 { font-size: clamp(4rem, 8vw, 9rem); }
.contact-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; overflow-wrap: anywhere; }
.contact-meta .social-link { margin-top: 0; }
.contact-form { grid-column: 2; grid-row: 1 / 3; display: grid; gap: 1.5rem; }
.contact-form textarea { min-height: 8rem; }
.honeypot { position: fixed !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.submit-page { max-width: 85rem; margin: auto; }
.submit-intro { max-width: 45rem; margin: -1rem 0 3rem auto; font-size: 1.15rem; line-height: 1.5; }
.submission-form { display: grid; gap: 3rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
label { display: grid; gap: .6rem; font: .7rem/1.5 monospace; text-transform: uppercase; letter-spacing: .04em; }
input, textarea, select { width: 100%; min-width: 0; padding: .8rem .4rem; border: 0; border-bottom: 1px solid var(--ink); background: transparent; border-radius: 0; color: var(--ink); font: 1rem "Helvetica Neue", Helvetica, Arial, sans-serif; }
input:focus, textarea:focus, select:focus { border-bottom-color: var(--acid); }
textarea { resize: vertical; min-height: 6rem; }
.work-card { border-top: 1px solid var(--ink); padding-top: 1.2rem; display: grid; gap: 1.5rem; }
.work-card header { display: flex; justify-content: space-between; }
.work-card h3 { margin: 0; font-size: 1.7rem; letter-spacing: -.04em; }
.remove-work { border: 0; background: transparent; text-decoration: underline; font-size: .75rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.form-message { font-size: .85rem; }
.success { font-size: 1.5rem; border-top: 1px solid; padding-top: 1.5rem; }

/* The updates panel stays within reach without covering page content. */
.keep-in-touch { position: absolute; top: calc(var(--header) + .95rem); right: var(--gutter); z-index: 15; width: 14rem; background: var(--paper); border: 1px solid var(--acid); color: var(--acid); }
.keep-in-touch[hidden] { display: none; }
.keep-in-touch-toggle { width: 100%; min-height: 2.35rem; padding: .5rem .8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 0; background: transparent; color: inherit; font: .6rem monospace; text-transform: uppercase; letter-spacing: .025em; }
.keep-in-touch-toggle:hover { background: var(--acid); color: white; }
.keep-in-touch-toggle span:last-child { font-size: 1.1rem; }
.keep-in-touch-panel { position: absolute; top: 100%; right: -1px; width: min(22rem, calc(100vw - 2 * var(--gutter))); padding: 1rem; border: 1px solid var(--acid); background: var(--paper); box-shadow: 0 12px 24px #18212614; color: var(--ink); }
.keep-in-touch-panel[hidden] { display: none; }
.keep-in-touch-panel form { display: grid; gap: 1rem; }
.keep-in-touch-actions { display: flex; align-items: center; gap: .8rem; }
.keep-in-touch-actions button { border: 0; padding: .65rem 1rem; background: var(--acid); color: white; font-size: .7rem; text-transform: uppercase; }
.keep-in-touch-actions [role="status"] { font-size: .8rem; }
.thank-you-page { display: grid; place-items: center; text-align: center; min-height: 70svh; }
.thank-you-page > div { max-width: 50rem; }
.thank-you-page .eyebrow { justify-content: center; }
.thank-you-page h2 { margin: 2rem 0; color: var(--acid); font-size: clamp(4rem, 12vw, 12rem); line-height: .85; letter-spacing: -.08em; }
.thank-you-page p { margin-bottom: 2.5rem; font-size: 1.2rem; }
footer { min-height: 5rem; margin: 0 var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font: .6rem/1.5 monospace; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--ink); }
footer a { text-decoration: none; }
footer a:hover { color: var(--acid); }

@media (min-width: 761px) {
  .home-route main { min-height: calc(100svh - var(--header) - 5rem); }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .home { grid-template-columns: minmax(0, 1.7fr) minmax(14rem, 1fr); gap: 0 2rem; }
  .home-edition { display: none; }
}
@media (max-width: 760px) {
  :root { --header: 5rem; }
  .menu-button { display: block; }
  nav { position: absolute; top: 100%; left: 0; right: 0; display: none; background: var(--paper); border: 1px solid var(--ink); padding: 1rem; flex-direction: column; gap: .5rem; }
  nav.open { display: flex; }
  nav a { font-size: .8rem; min-height: 2.75rem; }
  .keep-in-touch { position: relative; top: auto; right: auto; width: max-content; margin: 1rem var(--gutter) 0 auto; }
  .keep-in-touch-toggle { min-height: 2.75rem; }
  .page { padding-top: 2rem; padding-bottom: 3rem; }
  .home { grid-template-columns: minmax(0, 1fr); padding-top: 1.5rem; }
  .home-intro { padding-right: 0; }
  .home-edition { font-size: .55rem; }
  .eyebrow { font-size: .55rem; }
  .home h1 { gap: .2em; margin: 1.3rem 0 1.5rem; font-size: clamp(3rem, 14.5vw, 7rem); }
  .home-mark { font-size: .5em; }
  .home-slides { height: auto; aspect-ratio: 4 / 3; }
  .home-caption { font-size: .55rem; }
  .announcements { margin-top: 2rem; }
  .announcement-label { padding-bottom: 1rem; }
  .announcement { max-width: 34rem; font-size: 1.65rem; }
  .home-explore { margin-top: 1rem; font-size: 1.6rem; }
  .page-heading { display: block; margin-bottom: 3rem; }
  .page-heading h2 { font-size: clamp(2.9rem, 13.5vw, 6rem); margin-bottom: 1rem; }
  .exhibition-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .exhibition-info h4 { font-size: 2rem; }
  .detail { display: flex; flex-direction: column; gap: 2rem; }
  .detail-copy { position: static; order: -1; }
  .back { margin-bottom: 2rem; }
  .detail h2 { font-size: clamp(3rem, 14vw, 6rem); }
  .text-page { display: block; min-height: 65svh; }
  .text-page h2 { margin: 0 0 3rem; font-size: clamp(4rem, 18vw, 7rem); }
  .contact-page { display: flex; flex-direction: column; gap: 1.5rem; }
  .contact-page .page-heading h2 { font-size: clamp(4rem, 18vw, 7rem); }
  .contact-form { width: 100%; }
  .form-grid { gap: 1.5rem 1rem; }
  .submit-intro { margin: 0 0 3rem; }
  footer { padding: 1.2rem 0; flex-wrap: wrap; gap: .7rem; }
}
@media (max-width: 380px) {
  .home-edition { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .home-caption { flex-wrap: wrap; }
  .home-caption > span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
