body { font-family: system-ui, sans-serif; margin: 0; color: #000; background: #000; }

/* Banner image. The source image is 960 px square, so it is never drawn wider than 960 px (stretching it
   made it blurry). It sits under the header showing the logo band, and fades into black at the edges. */
.stage { position: relative; padding-top: calc(min(100vw, 960px) * 0.5); }
.stage::before {
  content: ""; position: absolute; z-index: -1; top: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 960px); height: calc(min(100vw, 960px) * 0.6);
  background: url("img/bg-960.jpg") center calc(min(100vw, 960px) * -0.07) / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, #000 80%, transparent);
  mask-composite: intersect;
}
.stage main { margin: 0 auto 2rem; }
header { background: #000; color: #fff; padding: 1rem 1rem .5rem; text-align: center; border-bottom: 2px solid #fff; }
header h1 { margin: 0 0 .25rem; letter-spacing: .03em; font-size: clamp(1.25rem, 4.5vw, 2rem); }
header p { margin: 0 0 .5rem; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; padding: .5rem 0; }
nav a { color: #fff; text-decoration: none; font-weight: 600; padding: .25rem .1rem; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: #fff; }
nav a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

main { max-width: 860px; padding: 0 1rem; }
section { background: #fff; color: #000; border: 2px solid #000; border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
h2 { margin-top: 0; }
a { color: #000; }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 6px; }
label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
input { width: 100%; max-width: 360px; padding: .5rem; font-size: 1rem; box-sizing: border-box; border: 2px solid #000; border-radius: 4px; }
button { padding: .5rem 1rem; font-size: 1rem; border: 2px solid #000; border-radius: 4px; background: #000; color: #fff; cursor: pointer; }
button:hover:not(:disabled) { background: #fff; color: #000; }
a.btn { display: inline-block; padding: .5rem 1rem; font-size: 1rem; border: 2px solid #000; border-radius: 4px; background: #000; color: #fff; text-decoration: none; }
a.btn:hover { background: #fff; color: #000; }
button.link { background: none; color: #000; border: 0; text-decoration: underline; padding: 0; }
button.link:hover { background: none; }
button:focus-visible, input:focus-visible, video:focus-visible, a:focus-visible { outline: 3px solid #000; outline-offset: 2px; }
button:disabled { opacity: .6; cursor: default; }
ul { list-style: none; padding: 0; margin: 0; }
li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid #000; }
li small { color: #444; display: block; }
.msg { margin: .75rem 0; min-height: 1.2em; }
.err { color: #b00020; font-weight: 600; }
.hidden { display: none; }

/* Galleries */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.cell { margin: 0; }
.cell .thumb { display: block; width: 100%; padding: 0; border: 2px solid #000; border-radius: 6px; background: #000; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.cell .thumb:hover:not(:disabled) { background: #000; }
.cell .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell video { max-height: none; aspect-ratio: 16 / 9; border: 2px solid #000; box-sizing: border-box; }
.cell figcaption { font-size: .9rem; padding-top: .25rem; }
@media (min-width: 520px) { .cell-video { grid-column: span 2; } }
.viewer { border: 0; padding: 0; background: #000; color: #fff; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.viewer::backdrop { background: #000; }
.viewer img { position: absolute; inset: 3rem 3.5rem 3rem; width: calc(100% - 7rem); height: calc(100% - 6rem); object-fit: contain; }
.viewer .cap { position: absolute; left: 0; right: 0; bottom: .75rem; text-align: center; padding: 0 1rem; }
.vbtn { position: absolute; background: #000; color: #fff; border: 2px solid #fff; }
.vbtn:hover:not(:disabled) { background: #fff; color: #000; }
.vclose { top: .5rem; right: .5rem; }
.vprev { left: .5rem; top: 50%; transform: translateY(-50%); }
.vnext { right: .5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) { .viewer img { inset: 3rem .25rem 3rem; width: calc(100% - .5rem); } }
