/* Venues page · the route map (ported from _lab/map/map.css) + venue rows, the line, the door, getting there.
   Everything is scoped to body.p-venues. The map imagery (media/map/*) is a light 3D city map rendered from
   OpenStreetMap data: it is never inverted or filtered, in either theme. */

/* ---------- page head: short, so the map comes first ---------- */
body.p-venues .vph { padding-bottom: clamp(40px, 5vw, 72px); }
body.p-venues .vph .sh { grid-column: 1 / -1; gap: 22px; }
body.p-venues .vph .h1 { font-size: clamp(44px, 6.6vw, 112px); text-wrap: balance; max-width: 17ch; }
body.p-venues .vph .sb--side { align-self: start; margin-top: 28px; gap: 10px; }
@media (min-width: 1081px) {
  /* the map is the showpiece: a two-line H1 with the lead beside it, so the 3D map and its plaques sit on the first screen */
  body.p-venues .vph { padding-top: calc(var(--edge) + 104px); padding-bottom: 12px; }
  body.p-venues .vph .sh { grid-column: 1 / 8; }
  body.p-venues .vph .h1 { font-size: clamp(44px, 4.6vw, 80px); max-width: none; }
  body.p-venues .vph .sb--side { grid-column: 8 / 13; grid-row: 1; align-self: end; margin-top: 0; }
}
body.p-venues .vph .sb--side .body { font-size: 19px; line-height: 1.5; max-width: 54ch; }
/* stills (phone, reduced motion): the first picture starts right under the head, so the head keeps its air */
body.p-venues.rmap-stills .vph { padding-bottom: clamp(40px, 5vw, 72px); }

/* ================= the route map ================= */
.rmap { position: relative; --rm-x: calc(var(--edge) + 24px); --rm-top: calc(var(--edge) + 80px); --rm-bot: calc(var(--edge) + 70px); }
.rmap__sticky { position: relative; padding: 0 var(--gut); }
.rmap__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #E4E4E6; margin: 0; }
.rmap__poster, .rmap__cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: none !important; }
.rmap__cv { opacity: 0; }
.rmap__lines, .rmap__tags { position: absolute; inset: 0; pointer-events: none; }
.rmap__lines { width: 100%; height: 100%; overflow: visible; }
.rmap__lines line { stroke: #111; stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .35s var(--ease); }
.rmap__lines line.is-on { opacity: .9; }

/* viewfinder corners on the picture */
.rmap__frame::before, .rmap__frame::after { content: ""; position: absolute; z-index: 3; width: 22px; height: 22px; pointer-events: none; border: 0 solid #fff; }
.rmap__frame::before { top: 14px; left: 14px; border-top-width: 1.5px; border-left-width: 1.5px; }
.rmap__frame::after { right: 14px; bottom: 14px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

/* the plaques: black museum plaques with a violet top rule, crisp HTML text */
.rtag { position: absolute; left: 0; top: 0; z-index: 2; transform: translate3d(var(--x, -999px), var(--y, -999px), 0) translate(-12px, calc(-100% - 10px));
  background: #111; color: #fff; padding: 9px 12px 10px; border-top: 3px solid #6827C1; min-width: 0; white-space: nowrap;
  opacity: 0; transition: opacity .35s var(--ease); will-change: transform, opacity; }
.rtag.is-on { opacity: 1; }
.rtag__name { display: block; font: 700 16px/1.15 var(--sans); letter-spacing: -.005em; }
.rtag__meta { display: block; margin-top: 5px; font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #D4D4D4; }
.rtag--walk { background: #fff; color: #111; border-top: 0; padding: 6px 10px 7px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.rtag--walk .rtag__name { font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.rtag--walk .rtag__name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: #6827C1; vertical-align: 0; }
.rtag--land { background: rgba(255,255,255,.94); color: #111; border-top: 0; padding: 5px 9px 6px; }
.rtag--land .rtag__name { font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.rtag::after { content: ""; position: absolute; left: 8px; bottom: -14px; width: 7px; height: 7px; border-radius: 50%; background: #6827C1; box-shadow: 0 0 0 2px #fff; }
.rtag--walk::after, .rtag--land::after { display: none; }
.rtag--flip { transform: translate3d(var(--x, -999px), var(--y, -999px), 0) translate(calc(-100% + 12px), calc(-100% - 10px)); }
.rtag--flip::after { left: auto; right: 8px; }
.rtag--below { transform: translate3d(var(--x, -999px), var(--y, -999px), 0) translate(-12px, 10px); }
.rtag--below::after { bottom: auto; top: -14px; }
.rtag--flip.rtag--below { transform: translate3d(var(--x, -999px), var(--y, -999px), 0) translate(calc(-100% + 12px), 10px); }
.rtag--compact { padding: 5px 8px 6px; }
.rtag--compact .rtag__meta { display: none; }

/* HUD: the caption, top left; the frame counter */
.rmap__hud { position: absolute; z-index: 3; left: 46px; top: 14px; display: none; align-items: center; gap: 14px; color: #111; background: rgba(255,255,255,.92); padding: 6px 10px; font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.rmap__hud b { font-weight: 500; color: #6827C1; font-variant-numeric: tabular-nums; }
.rmap__hint { display: none; }

/* steps: a plain list at rest (no JS) */
.rmap__steps { list-style: none; margin: 0; padding: var(--gap) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px var(--gap); }
.rstep { position: relative; border-top: 1px solid var(--fg); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rstep__k { font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); padding-right: 64px; }
.rstep__k::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--accent); vertical-align: 0; }
.rstep__h { font: 700 var(--t-h3)/1.06 var(--sans); letter-spacing: -.015em; }
.rstep__p { font: 400 17px/1.5 var(--sans); color: var(--fg); max-width: 46ch; }
.rstep--walk .rstep__h { font-size: clamp(21px, 1.7vw, 26px); }
.rstep__pi { position: absolute; right: 0; top: 12px; display: flex; gap: 6px; color: var(--accent-t); }
.rstep__pi svg { width: 26px; height: 26px; }
.rstep .btn { align-self: flex-start; margin-top: 6px; }
.rmap__line { display: none; }
.rmap__cap { padding: 12px var(--gut) 0; }

/* ---------- live: the sticky stage, scrubbed by scroll ---------- */
.rmap.is-live { height: var(--rmap-h, 560vh); scroll-margin-top: -100px; }
.rmap.is-live .rmap__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding: 0; }
.rmap.is-live .rmap__frame { position: absolute; top: var(--rm-top); left: var(--rm-x); right: var(--rm-x); bottom: var(--rm-bot); aspect-ratio: auto; }
.rmap.is-live .rmap__cv { opacity: 1; }
.rmap.is-live .rmap__hud { display: flex; }
/* the map credit (OpenStreetMap licence): bottom right of the picture while the caption under it is hidden */
.rmap__osm { display: none; }
.rmap.is-live .rmap__osm { display: block; position: absolute; z-index: 3; right: 10px; bottom: 8px; margin: 0; padding: 4px 8px; background: rgba(255,255,255,.88); color: #333; font: 500 12px/1.2 var(--mono); letter-spacing: .03em; }
.rmap.is-live .rmap__cap { display: none; }
.rmap.is-live .rmap__steps { position: absolute; z-index: 4; left: calc(var(--rm-x) + 28px); bottom: calc(var(--rm-bot) + 28px); width: min(460px, calc(100% - 2 * var(--rm-x) - 56px)); padding: 0; display: block; }
.rmap.is-live .rstep { position: absolute; left: 0; bottom: 0; width: 100%; background: var(--bg); color: var(--fg); border-top: 3px solid var(--accent); padding: 20px 22px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s; visibility: hidden; }
.rmap.is-live .rstep.is-on { opacity: 1; transform: none; visibility: visible; transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s; }
.rmap.is-live .rstep__pi { right: 20px; top: 18px; }
.rmap.is-live .rmap__hint { display: flex; align-items: center; gap: 10px; position: absolute; z-index: 3; right: 14px; bottom: 14px; margin: 0 28px 26px 0; font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #111; background: rgba(255,255,255,.92); padding: 8px 12px; transition: opacity .4s var(--ease); }
.rmap.is-live .rmap__hint i { font-style: normal; display: inline-block; animation: rmHint 1.6s var(--ease) infinite; }
@keyframes rmHint { 50% { transform: translateY(3px); } }
.rmap.is-live.is-moved .rmap__hint { opacity: 0; }

/* the line under the stage: the festival line with its stops; the fill is the progress */
.rmap.is-live .rmap__line { display: block; position: absolute; left: var(--rm-x); right: var(--rm-x); bottom: calc(var(--edge) + 6px); height: 50px; }
.rmap__rail { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--hair); }
.rmap__rail i { position: absolute; inset: -1px 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.rmap__stop { position: absolute; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 44px; padding: 5px 0 0; transform: translateX(-6px); font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }
.rmap__stop i { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--fg-3); transition: box-shadow .3s, background .3s, transform .3s var(--ease); }
.rmap__stop.is-end { transform: translateX(-100%); align-items: flex-end; }
.rmap__stop.is-end i { width: 14px; height: 14px; border-radius: 2px; transform: rotate(45deg) scale(.85); }
.rmap__stop.is-past i { box-shadow: inset 0 0 0 2px var(--accent); }
.rmap__stop.is-here { color: var(--fg); }
.rmap__stop.is-here i { background: var(--accent); box-shadow: 0 0 0 5px rgba(104, 39, 193, .2); transform: scale(1.15); }
.rmap__stop.is-end.is-here i { transform: rotate(45deg) scale(1); }
.rmap__stop:hover, .rmap__stop:focus-visible { color: var(--accent-t); }

/* ---------- stills: phone and reduced motion ---------- */
.rmap.is-stills .rmap__sticky > .rmap__frame, .rmap.is-stills .rmap__steps { display: none; }
.rmap.is-stills .rmap__sticky { padding: 0; }
.rshots { display: none; }
.rmap.is-stills .rshots { display: grid; gap: 12px; margin: 0; padding: 0 var(--gut); list-style: none; }
.rshot { margin: 0; }
.rshot .rmap__frame { aspect-ratio: 16 / 9; }
.rshot .rtag { opacity: 1; transform: translate(calc(-12px + var(--sx, 0px)), calc(-100% - 10px)); }
.rshot .rtag.rtag--below { transform: translate(calc(-12px + var(--sx, 0px)), 10px); }
.rshot .rtag::after { left: calc(8px - var(--sx, 0px)); }
.rshot .rtag__name { font-size: 14px; }
.rshot .rtag__meta { font-size: 12px; }
.rshot__cap { border-top: 0; padding: 14px 0 6px; }
.rshot__cap .rstep__pi { top: 12px; }
.rshot--end .rshot__cap { border-top: 3px solid var(--accent); padding-top: 16px; }
.rshot__walk { display: flex; align-items: center; gap: 12px; padding: 4px 0; font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.rshot__walk::before { content: ""; width: 2px; height: 30px; background: var(--accent); margin-left: 12px; }
@media (min-width: 900px) {
  .rmap.is-stills .rshots { grid-template-columns: 1fr 1fr; gap: 28px var(--gap); }
  .rmap.is-stills .rshot__walk { display: none; }
  .rmap.is-stills .rshot--end { grid-column: 1 / -1; }
  .rmap.is-stills .rshot--end .rshot__cap { max-width: calc(50% - var(--gap) / 2); }  /* one column: its violet rule ends where the column does */
}

/* ================= venue by venue ================= */
body.p-venues .vhead { display: flex; flex-direction: column; gap: 22px; margin-bottom: clamp(36px, 4vw, 60px); }
body.p-venues .vhead .h2, body.p-venues .sec .h2 { text-wrap: balance; }
.vrows { display: flex; flex-direction: column; border-top: 1px solid var(--fg); }
.vrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 52px); padding: clamp(28px, 3vw, 44px) 0; border-bottom: 1px solid var(--hair); }
.vrow__img { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #E4E4E6; align-self: start; }
.vrow__img img { width: 100%; height: 100%; object-fit: cover; filter: none !important; transition: transform 1.2s var(--ease); }
.vrow:hover .vrow__img img { transform: scale(1.04); }
.vrow__tag { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; background: #111; color: #fff; padding: 8px 11px 9px; border-top: 3px solid #6827C1; }
.vrow__tag b { font: 700 15px/1.15 var(--sans); }
.vrow__tag span { font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #D4D4D4; }
.vrow__t { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 720px; }
.vrow__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vrow__pi { display: flex; gap: 8px; color: var(--accent-t); }
.vrow__pi svg { width: 30px; height: 30px; }
.vrow__h { font: 700 clamp(30px, 3vw, 48px)/1 var(--sans); letter-spacing: -.025em; }
.vrow__lead { font-size: 18px; line-height: 1.5; max-width: 58ch; }
.vrow__dl { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0; margin-top: 4px; border-top: 1px solid var(--hair); }
.vrow__dl dt, .vrow__dl dd { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.vrow__dl dt { font: 500 12px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.vrow__dl dd { font-size: 17px; line-height: 1.5; }
.vrow__dl dd .ln { display: block; }
.vrow__dl dd .ln + .ln { margin-top: 4px; }
.vrow__dl dd .tbc { font-size: 12px; padding: 2px 6px; vertical-align: 1px; }
.vrow__dl .access { white-space: normal; font-size: 12px; }
.vrow__dl .access + .ln { margin-top: 6px; }
.vrow__t .more { align-self: flex-start; }
.vdin { display: grid; grid-template-columns: 56px minmax(0, 4fr) minmax(0, 5fr) auto; gap: 18px 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--fg); }
.vdin__pi { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--hair); color: var(--accent-t); }
.vdin__pi svg { width: 30px; height: 30px; }
.vdin__t { display: flex; flex-direction: column; gap: 10px; }
.vdin__p { font-size: 17px; color: var(--fg-2); }

/* ================= the line ================= */
body.p-venues .vline { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 72px); }
body.p-venues .diagram .w { font-size: 14px; }
.walks { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); align-items: start; gap: 16px var(--gap); margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--fg); }
.walks ul { display: flex; flex-direction: column; }
.walks > .lbl { padding-top: 14px; }
.walks li { display: grid; grid-template-columns: 170px minmax(40px, 1fr) 170px 90px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 17px; }
.walks li i { height: 2px; background: var(--accent); position: relative; }
.walks li i::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.walks li b { font: 500 17px/1 var(--mono); text-align: right; letter-spacing: -.01em; }

/* ================= at the door + getting there ================= */
body.p-venues #door .sh .body { max-width: 40ch; }
body.p-venues .checks li { font-size: 18px; line-height: 1.5; padding: 16px 0; }
body.p-venues .vget { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px var(--gap); }
body.p-venues .vget div { font-size: 17px; gap: 12px; }
body.p-venues .vget .body { font-size: 17px; line-height: 1.55; max-width: 56ch; }
body.p-venues .vget .body b { font-weight: 700; }
body.p-venues .vget .mail { font-size: 15px; }

/* ================= breakpoints ================= */
@media (max-width: 1080px) {
  .vrow { grid-template-columns: 1fr; }
  .vrow__img { aspect-ratio: 16 / 9; }
  .vdin { grid-template-columns: 56px minmax(0, 1fr); }
  .vdin__p, .vdin .access { grid-column: 2; }
  .walks { grid-template-columns: 1fr; }
  .rmap__long { display: none; }
  /* narrow stages: only the current stop is named, the others keep their dots (each has an aria-label) */
  .rmap__stop:not(.is-here) span { opacity: 0; }
  .rmap__stop:not(.is-here):hover span, .rmap__stop:not(.is-here):focus-visible span { opacity: 1; }
}
@media (max-width: 760px) {
  .rtag { padding: 6px 9px 7px; }
  .rtag__name { font-size: 14px; }
  .rtag__meta { font-size: 12px; }
  .vrow__dl { grid-template-columns: 1fr; }
  .vrow__dl dt { padding: 12px 0 0; border-bottom: 0; }
  .vrow__dl dd { padding: 2px 0 12px; }
  /* on a phone the same close-ups were just shown as the stills of the map above: no second copy */
  body.rmap-stills .vrow__img { display: none; }
  .vrow { padding: 24px 0 28px; }
  .walks li { grid-template-columns: minmax(0, 1fr) 70px; gap: 4px 12px; }
  .walks li i { display: none; }
  .walks li span:nth-of-type(2)::before { content: "→ "; color: var(--accent-t); }
  .walks li span:first-child { grid-column: 1; }
  .walks li span:nth-of-type(2) { grid-column: 1; }
  .walks li b { grid-column: 2; grid-row: 1 / 3; }
  body.p-venues .vget { grid-template-columns: 1fr; }
  .rstep__pi svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .rtag, .rstep, .rmap__lines line, .vrow__img img { transition: none !important; }
  .vrow:hover .vrow__img img { transform: none; }
}

/* reading floor */
body.p-venues .vph .small { font-size: 17px; line-height: 1.5; }
