/* The exhibition: a special project. Loaded only on special pages, after the main stylesheet.
   A dark gallery walked in publication order. Each picture is lit from above and hung at the size its
   file allows: projected wall to wall, matted and framed, or small in a wide mat on a big wall. */

@layer rooms {
	:root:has(.exhibition) { scroll-snap-type: y proximity; background: var(--wall); }
	.exhibition {
		--wall: #0d0d0c;
		--wall-2: #141413;
		--mat: #f2efe7;
		--placard: #f4f2ec;
		--lit: rgb(255 246 226 / 0.15);
		background: var(--wall);
		color: var(--band-ink);
	}

	/* The only fixtures: the way home and the other languages. */
	.ex-bar { position: fixed; inset: 0 0 auto; z-index: 9; display: flex; justify-content: space-between; align-items: center; padding: 0.9rem var(--m); pointer-events: none; mix-blend-mode: difference; color: #f4f2ec; }
	.ex-bar a { pointer-events: auto; color: inherit; text-decoration: none; }
	.exit { display: inline-flex; align-items: center; gap: 0.5rem; font: 800 1.0625rem/1 var(--serif); }
	.exit .swirl { width: 2rem; }
	.ex-bar .langs { display: flex; gap: 0.9rem; list-style: none; margin: 0; padding: 0; font: 400 0.8125rem/1 "Vodka Mini", var(--sans); font-stretch: 75%; letter-spacing: 0.06em; }
	.ex-bar .langs [aria-current] { text-decoration: underline; text-underline-offset: 0.3em; }

	/* The entrance. */
	.hall { position: relative; min-height: 100svh; display: grid; align-content: center; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 6rem var(--m) 3.5rem; scroll-snap-align: start; background: radial-gradient(ellipse 60% 48% at 50% 0%, #34322d 0%, var(--wall) 75%); }
	.hall-kick { font: 700 0.875rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.32em; text-transform: uppercase; color: var(--red); }
	[lang="hy"] .hall-kick, :root:lang(hy) .hall-kick { letter-spacing: 0.06em; text-transform: none; }
	.hall-title { font: 800 calc(var(--k) * min(28vw, 28rem, 88vw / (var(--w, 5) * 0.62)))/0.86 var(--serif); letter-spacing: -0.045em; margin-block: 0.08em 0.14em; color: #f4f2ec; text-shadow: 0 0.04em 0.12em rgb(0 0 0 / 0.6); }
	[lang="hy"] .hall-title, :root:lang(hy) .hall-title { font-size: min(24vw, 24rem, 86vw / (var(--w, 5) * 0.74)); letter-spacing: -0.01em; line-height: 1; margin-block-end: 0.32em; }
	.hall-line { font: 400 1.0625rem/1.4 var(--sans); font-stretch: 75%; letter-spacing: 0.05em; color: var(--band-soft); }
	.hall-text { max-width: 36rem; margin-block-start: 1.75rem; font-style: italic; font-size: 1.25rem; line-height: 1.5; }
	[lang="hy"] .hall-text, :root:lang(hy) .hall-text { font-style: normal; }

	/* A room. */
	.room { position: relative; overflow: clip; min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 1.75rem; padding: 5.5rem var(--m) 4rem; scroll-snap-align: start; isolation: isolate; }
	.room::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 70% 42% at var(--lx, 50%) 0%, var(--lit), transparent 72%); }
	.room-n { position: absolute; inset: 1.5rem var(--m) auto auto; z-index: -1; font: 800 34vw/0.8 var(--serif); letter-spacing: -0.04em; color: #1b1b19; user-select: none; }
	.room-date { display: none; }
	.room > * { min-width: 0; }

	/* The picture on the wall. */
	.work { margin: 0; position: relative; }
	.work a { display: block; }
	.work img { display: block; height: auto; max-width: min(100%, var(--pw) * 1px); }
	.hang-mat .work, .hang-small .work { background: var(--mat); padding: var(--pad, 10px); box-shadow: 0 0 0 1px #050505, 0 0 0 5px #1b1b1a, 0 0 0 6px #050505, 0 50px 90px -30px rgb(0 0 0 / 0.95); }
	.hang-mat .work img, .hang-small .work img { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2), 0 0 0 1px rgb(0 0 0 / 0.18); }
	.hang-small .work { --pad: clamp(26px, 7vw, 84px); width: min(100%, var(--pw) * 1px + 2 * var(--pad)); }
	.hang-small .work img { width: 100%; }
	.hang-full { padding-inline: 0; padding-block-start: 4.5rem; }
	.hang-full .work { width: 100%; }
	.hang-full .work img { width: 100%; max-width: none; }
	.hang-full .label { padding-inline: var(--m); }

	/* The label: a placard, and the person's own words on the wall above it. */
	.label { width: 100%; max-width: 34rem; display: grid; gap: 1.75rem; justify-items: start; }
	.card { width: 100%; max-width: 22rem; display: grid; gap: 0.45rem; padding: 1.1rem 1.25rem 1.2rem; background: var(--placard); color: #191919; box-shadow: 0 18px 30px -18px rgb(0 0 0 / 0.9); }
	.card-n { font: 800 1.75rem/0.9 var(--serif); letter-spacing: -0.02em; }
	.card h2 { font: 800 calc(var(--k) * 1.5rem)/1.1 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
	[lang="hy"] .card h2, :root:lang(hy) .card h2 { letter-spacing: 0; line-height: 1.22; }
	.card h2 a { color: inherit; text-decoration: none; }
	.card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
	.card-meta { font: 400 0.8125rem/1.35 var(--sans); font-stretch: 75%; letter-spacing: 0.02em; color: #5b5b5b; }
	.card-text { font-size: 0.9375rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; margin-block-start: 0.2rem; }
	.card-go { justify-self: start; margin-block-start: 0.35rem; font: 700 0.8125rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); text-decoration: none; }
	.card-go:hover { text-decoration: underline; text-underline-offset: 0.25em; }
	[lang="hy"] .card-go, :root:lang(hy) .card-go { text-transform: none; letter-spacing: 0.02em; }
	.voice { margin: 0; display: grid; gap: 1rem; }
	.voice p { font: italic 400 clamp(1.625rem, 1.1rem + 1.5vw, 2.5rem)/1.22 var(--serif); letter-spacing: -0.01em; text-wrap: pretty; }
	.voice.is-long p { font-size: clamp(1.3125rem, 1rem + 0.9vw, 1.875rem); line-height: 1.3; }
	[lang="hy"] .voice p, :root:lang(hy) .voice p { font-style: normal; font-size: calc(0.9 * clamp(1.625rem, 1.1rem + 1.5vw, 2.5rem)); line-height: 1.32; letter-spacing: 0; }
	[lang="hy"] .voice.is-long p, :root:lang(hy) .voice.is-long p { font-size: calc(0.9 * clamp(1.3125rem, 1rem + 0.9vw, 1.875rem)); }
	.voice footer { font-size: 1rem; line-height: 1.5; color: var(--band-soft); max-width: 34rem; }
	.wall-text { font: 400 clamp(1.25rem, 1rem + 0.7vw, 1.625rem)/1.45 var(--serif); color: var(--band-ink); text-wrap: pretty; max-width: 36rem; }

	@media (min-width: 1000px) {
		/* The line of the floor plan, walked: it runs down the wall past every room, with each room's date on it. */
		.exhibition main { background: linear-gradient(var(--red), var(--red)) calc(var(--m) / 2) 0 / 1px 100% no-repeat; }
		.room-date { display: block; position: absolute; inset: 7rem auto auto calc(var(--m) / 2); writing-mode: vertical-rl; rotate: 180deg; translate: -50% 0; padding-block: 0.75rem; background: var(--wall); font: 400 0.75rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--band-soft); white-space: nowrap; }
		[lang="hy"] .room-date, :root:lang(hy) .room-date { text-transform: none; letter-spacing: 0.04em; }
		.room-date::before { content: ""; position: absolute; inset: auto 50% -0.3rem auto; translate: 50% 0; width: 7px; height: 7px; background: var(--red); }
		.room { padding: 7rem calc(var(--m) + 3rem) 6rem; column-gap: clamp(3rem, 5vw, 6rem); grid-template-columns: minmax(0, auto) 21rem; justify-content: center; align-items: end; }
		.side-r { grid-template-columns: 21rem minmax(0, auto); }
		.side-r .work { order: 2; }
		.side-l { --lx: 38%; }
		.side-r { --lx: 62%; }
		.room-n { font-size: min(40svh, 22rem); inset: 2.5rem auto auto calc(var(--m) + 1rem); }
		.side-l .room-n { inset-inline: auto calc(var(--m) + 1rem); }
		.hang-mat .work { --pad: clamp(16px, 2.2vw, 34px); }
		.hang-mat .work img { max-height: 70svh; width: auto; }
		.hang-mat.is-tall .work img { max-height: 78svh; }
		.hang-small { align-items: center; }
		.has-voice { grid-template-columns: minmax(0, auto) minmax(22rem, 32rem); }
		.has-voice.side-r { grid-template-columns: minmax(22rem, 32rem) minmax(0, auto); }
		.hang-mat.has-voice .work img { max-height: 62svh; max-width: min(100%, var(--pw) * 1px, 46vw); }
		.hang-full { display: block; padding-inline: 0; padding-block: 0 6rem; }
		.hang-full .work img { width: auto; max-width: 100%; max-height: 100svh; margin-inline: auto; }
		.hang-full .label { max-width: calc(68rem + 2 * var(--m)); margin: 3.5rem auto 0; grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; column-gap: 5rem; }
		.hang-full .room-n { display: none; }
	}

	/* The lights come up as you reach a picture, where the browser can tie it to scrolling. */
	@media (prefers-reduced-motion: no-preference) {
		@supports (animation-timeline: view()) {
			.work { animation: vodka-light linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
			.room::before { animation: vodka-pool linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
			@keyframes vodka-light { from { filter: brightness(0.16) saturate(0.4); } to { filter: none; } }
			@keyframes vodka-pool { from { opacity: 0; } to { opacity: 1; } }
		}
	}

	/* A long pause in time is a long stretch of empty wall. */
	.pause { position: relative; height: clamp(90svh, var(--days) * 0.2svh, 170svh); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding-block: 4rem; background: linear-gradient(var(--red), var(--red)) 50% 0 / 1px 100% no-repeat; }
	.pause p { display: grid; justify-items: center; gap: 0.6rem; padding: 0.9rem 1rem; background: var(--wall); }
	.pause span { font: 400 0.8125rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.22em; text-transform: uppercase; color: var(--band-soft); }
	[lang="hy"] .pause span, :root:lang(hy) .pause span { text-transform: none; letter-spacing: 0.04em; }
	.pause b { font: 800 clamp(5rem, 2rem + 14vw, 15rem)/0.8 var(--serif); letter-spacing: -0.04em; color: #2a2926; }

	/* The way out: a paper wall with the list of works. */
	.way-out { display: grid; justify-items: center; gap: 2rem; padding: clamp(5rem, 12svh, 9rem) var(--m) 5rem; background: var(--placard); color: var(--ink); text-align: center; scroll-snap-align: start; }
	.works { width: min(100%, 62rem); list-style: none; margin: 0 0 2.5rem; padding: 0; border-block-start: 4px solid var(--ink); text-align: start; }
	.works li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.2rem; padding-block: 0.7rem 0.75rem; border-block-end: 1px solid var(--line); align-items: baseline; }
	.works-n { font: 700 0.875rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.08em; color: var(--red); }
	.works a { font: 800 calc(var(--k) * 1.375rem)/1.15 var(--serif); letter-spacing: -0.01em; color: inherit; text-decoration: none; }
	[lang="hy"] .works a, :root:lang(hy) .works a { letter-spacing: 0; line-height: 1.25; }
	.works a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
	.works-meta { grid-column: 2; font: 400 0.8125rem/1.35 var(--sans); font-stretch: 75%; color: var(--soft); }
	@media (min-width: 800px) {
		.works li { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
		.works-meta { grid-column: 3; text-align: end; }
	}
	.way-out-line { font: italic 400 clamp(2rem, 1.2rem + 3vw, 3.75rem)/1.12 var(--serif); max-width: 20ch; text-wrap: balance; }
	[lang="hy"] .way-out-line, :root:lang(hy) .way-out-line { font-style: normal; font-weight: 700; font-size: clamp(1.625rem, 1rem + 2.4vw, 3rem); line-height: 1.25; }
	.way-out-home { display: inline-flex; align-items: center; gap: 0.5rem; margin-block-start: 1.5rem; font: 800 1.125rem/1 var(--serif); color: var(--ink); text-decoration: none; }
	.way-out-home .swirl { width: 2.25rem; }
}

/* The line of time in the entrance: one rule at true scale, a red mark at each publication, every story a flag
   on a leader from its mark. The first run hangs above the rule as a staircase, the last below its far end; the
   silence between is dimensioned under the rule. Wide screens lay the rule down; narrower ones stand it up. */
@layer rooms {
	.tl { --rule: rgb(244 242 236 / 0.8); --hair: rgb(244 242 236 / 0.34); --pole: 0.75rem; width: min(100%, 80rem); margin-block-start: clamp(4.5rem, 11svh, 7.5rem); text-align: start; color: var(--band-ink); }
	.tl ol { list-style: none; margin: 0; padding: 0; }
	.tl a { color: inherit; text-decoration: none; }
	.tl a:hover .tl-t > span, .tl a:focus-visible .tl-t > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
	.tl a:focus-visible { outline: 1px solid var(--band-ink); outline-offset: 4px; }
	.tl-n { font: 700 1.5rem/1 var(--serif); letter-spacing: 0.01em; font-variant-numeric: lining-nums; }
	.tl-t { font: 400 calc(var(--k) * 1.0625rem)/1.3 var(--serif); color: rgb(244 242 236 / 0.9); }
	.tl-t time { font: 400 0.75rem/1 var(--sans); font-stretch: 75%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-soft); white-space: nowrap; }
	[lang="hy"] .tl-t time, :root:lang(hy) .tl-t time { text-transform: none; letter-spacing: 0.03em; font-size: 0.8125rem; }

	/* Lying down. */
	.tl-tall { display: none; }
	.tl-flat a { display: inline-flex; align-items: baseline; gap: 0.6rem; white-space: nowrap; }
	.tl-flat .tl-t { display: inline-flex; align-items: baseline; gap: 0.7rem; }
	.tl-up, .tl-down { position: relative; overflow: clip; }
	.tl .tl-up { padding-block-end: 1.5rem; }
	.tl .tl-down { padding-block-start: 4.6rem; }
	.tl-up li, .tl-down li { position: relative; margin-block: 0 0.6rem; }
	.tl-up li { margin-inline-start: calc(var(--x) * 1%); padding-inline-start: var(--pole); }
	.tl-down li { width: calc(var(--x) * 1%); padding-inline-end: var(--pole); text-align: end; }
	.tl-up li::before, .tl-down li::before { content: ""; position: absolute; top: 0.98rem; width: calc(var(--pole) - 0.3rem); height: 1px; background: var(--hair); }
	.tl-up li::after, .tl-down li::after { content: ""; position: absolute; width: 1px; height: 100vh; background: var(--hair); }
	.tl-up li::before, .tl-up li::after { left: 0; }
	.tl-down li::before, .tl-down li::after { right: 0; }
	.tl-up li::after { top: 0.98rem; }
	.tl-down li::after { bottom: calc(100% - 0.98rem - 1px); }
	.tl-rule { position: relative; height: 1px; background: var(--rule); }
	.tl-rule::before, .tl-rule::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--rule); }
	.tl-rule::before { left: 0; }
	.tl-rule::after { right: 0; }
	.tl-mo { position: absolute; left: calc(var(--x) * 1%); bottom: 1px; width: 1px; height: 5px; background: var(--hair); }
	.tl-yr { position: absolute; left: calc(var(--x) * 1%); top: 0.55rem; padding-inline-start: 0.375rem; font: 600 0.875rem/1 var(--serif); letter-spacing: 0.01em; font-variant-numeric: lining-nums; color: var(--band-ink); }
	.tl-yr.is-tick::before { content: ""; position: absolute; left: 0; top: -0.55rem; width: 1px; height: 0.8rem; background: var(--rule); }
	.tl-mk { position: absolute; left: calc(var(--x) * 1%); top: -6px; width: 2px; height: 13px; translate: -0.5px 0; background: var(--red); }
	.tl-gap { position: absolute; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); top: 1px; height: 3rem; margin: 0; display: flex; align-items: flex-end; justify-content: center; border-inline: 1px solid var(--hair); }
	/* The dimension line, with a drafter's oblique stroke at each end. */
	.tl-gap::after { content: ""; position: absolute; inset: auto -5px -5px; height: 11px; background: linear-gradient(var(--hair), var(--hair)) 0 50% / 100% 1px no-repeat, linear-gradient(-45deg, transparent 45%, var(--rule) 45% 55%, transparent 55%) 0 0 / 11px 11px no-repeat, linear-gradient(-45deg, transparent 45%, var(--rule) 45% 55%, transparent 55%) 100% 0 / 11px 11px no-repeat; }
	.tl-gap span { position: relative; z-index: 1; translate: 0 50%; padding-inline: 1rem; background: var(--wall); font: italic 400 1.375rem/1 var(--serif); letter-spacing: 0.005em; color: var(--band-ink); }
	[lang="hy"] .tl-gap span, :root:lang(hy) .tl-gap span { font-style: normal; font-size: 1.25rem; }

	/* Stood upright. */
	@media (max-width: 79.99rem) {
		.tl-flat { display: none; }
		.tl-tall { display: block; position: relative; width: min(100%, 32rem); margin-inline: auto; }
		.tl-tall svg { position: absolute; left: 0; top: 0; overflow: visible; }
		.tl-tall path { fill: none; stroke: var(--hair); stroke-width: 1; }
		.tl-tall .rule, .tl-tall .yr { stroke: var(--rule); }
		.tl-tall .mk { stroke: var(--red); stroke-width: 2; }
		.tl-tall text { fill: var(--band-ink); font: 600 15px var(--serif); font-variant-numeric: lining-nums; }
		.tl-tall li { position: absolute; left: var(--lx); right: 0; translate: 0 -0.66rem; }
		.tl-tall a { display: block; }
		.tl-tall .tl-n { font-size: 1.3125rem; white-space: nowrap; }
		.tl-tall .tl-t { display: contents; }
		.tl-tall .tl-t time { margin-inline-start: 0.6rem; }
		.tl-tall .tl-t > span { display: block; margin-block-start: 0.3rem; font-size: calc(var(--k) * 1rem); line-height: 1.25; text-wrap: balance; }
		.tl-tall .tl-gap { position: absolute; width: auto; height: auto; margin: 0; border: 0; translate: -50% -50%; padding: 0.55rem 0; background: var(--wall); font: italic 400 1.25rem/1 var(--serif); white-space: nowrap; color: var(--band-ink); }
		.tl-tall .tl-gap::after { content: none; }
		[lang="hy"] .tl-tall .tl-gap, :root:lang(hy) .tl-tall .tl-gap { font-style: normal; font-size: 1.125rem; }
	}
}
