/* Art pages (generated by tools/art/build.py). Structure only: colours and type come from the design
   tokens (--bg, --hi, --accent, --band1..3 and their --ink1..3). */
.art { padding: 36px 0 80px; }
.art a { text-decoration: none; color: inherit; }
.art img { width: 100%; height: auto; }
.art-h { margin: 0; font-family: var(--display); font-weight: var(--display-weight, 700); font-size: clamp(34px, 7vw, 104px);
  line-height: .95; letter-spacing: var(--display-tracking, -.01em); text-transform: var(--display-case, none); color: var(--hi); }
.art-text { font-size: 18px; line-height: 1.5; margin: 18px 0 0; max-width: 34em; }
.art-more, .art-back a, .art-count { font-family: var(--label, var(--font)); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.art-more { display: inline-block; margin-top: 24px; padding-bottom: 3px; border-bottom: 2px solid currentColor; font-weight: 600; }
.art-more:hover { opacity: .7; }
.art :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* art page: three bands, the word set huge, two images per band (PICKS in the build script) */
.p-band { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr; gap: 0 40px; padding: 40px; margin-bottom: 4px; }
.p-1 { background: var(--band1); color: var(--ink1); }
.p-2 { background: var(--band2); color: var(--ink2); }
.p-3 { background: var(--band3); color: var(--ink3); }
.p-band .art-h { color: inherit; }
.p-word { display: contents; }
.p-band .art-h { grid-column: 1 / -1; margin-bottom: 28px; overflow-wrap: anywhere; }
.p-band .art-text { grid-column: 1; margin-top: 0; }
.p-band .art-more { grid-column: 1; justify-self: start; align-self: start; }
.p-pair { display: grid; grid-column: 2; grid-row: 2 / 5; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.p-tile { display: block; overflow: hidden; aspect-ratio: 3 / 4; }
.p-tile img { height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.p-tile:nth-child(2) { margin-top: 90px; }
.p-tile:hover img { transform: scale(1.03); }

/* section pages */
.art-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 24px; margin-bottom: 40px; }
.art-head > * { grid-column: 1; }
.art-back { margin: 0 0 18px; }
.art-back a { color: var(--muted); }
.art-back a::before { content: "← "; }
.art-back a:hover { color: var(--accent); }
.art-count { grid-column: 2; grid-row: 3; align-self: end; margin: 0; color: var(--muted); }

.art-masonry { columns: 3; column-gap: 16px; }
.art-masonry .lb-item { display: block; margin-bottom: 16px; break-inside: avoid; }
.lb-item img { transition: opacity .25s; }
.lb-item:hover img { opacity: .82; }

/* photography: a sideways film strip at full height on wide screens, a plain stack on phones */
.film { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.film:focus { outline: none; }
.film-frame { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.film-frame img { height: min(72vh, 760px); width: auto; max-width: none; }
.film-frame figcaption { font-family: var(--label, var(--font)); font-size: 12px; letter-spacing: .12em; color: var(--muted); margin-top: 8px; }
.film-hint { font-family: var(--label, var(--font)); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 0; }

/* projects: one block per project */
.proj { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding: 28px 0 56px; border-top: 1px solid var(--rule); }
.proj-num, .proj-count { font-family: var(--label, var(--font)); font-size: 12px; letter-spacing: .12em; color: var(--accent); }
.proj-count { color: var(--muted); text-transform: uppercase; }
.proj h2 { font-family: var(--display); font-weight: var(--display-weight, 700); text-transform: var(--display-case, none); letter-spacing: var(--display-tracking, 0);
  font-size: 30px; line-height: 1.05; color: var(--hi); margin: 10px 0 12px; }
.proj p { font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.proj-photos { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.proj-photos .lb-item { flex: 0 0 auto; }
.proj-photos img { height: 340px; width: auto; max-width: none; }

/* lightbox (assets/js/art.js) */
dialog.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--hi); }
dialog.lb::backdrop { background: var(--bg); }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 64px; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; }
dialog.lb button { position: absolute; font: inherit; font-family: var(--label, var(--font)); background: none; border: 0; color: var(--hi); cursor: pointer; padding: 14px 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
dialog.lb button:hover { color: var(--accent); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 28px !important; }
.lb-prev { left: 4px; } .lb-next { right: 4px; }
.lb-close { top: 8px; right: 8px; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--label, var(--font)); font-size: 12px; letter-spacing: .12em; color: var(--muted); }

@media (max-width: 900px) {
  .p-band { grid-template-columns: minmax(0, 1fr); padding: 26px 18px 30px; }
  .p-band .art-h { margin-bottom: 16px; }
  .p-pair { grid-column: 1; grid-row: auto; margin-top: 28px; }
  .p-tile:nth-child(2) { margin-top: 40px; }
  .art-masonry { columns: 2; column-gap: 10px; }
  .art-masonry .lb-item { margin-bottom: 10px; }
  .proj { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .proj-photos img { height: 260px; }
  .lb-stage { padding: 52px 8px; }
}
@media (max-width: 600px) {
  .film { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 22px; }
  .film-frame img { height: auto; width: 100%; max-width: 100%; }
  .film-hint { display: none; }
  .art-count { grid-column: 1; grid-row: auto; margin-top: 14px; }
}
