/* Maison Magpie: a small exhibition that is rehung every day.
   Each piece gets a room of its own, lit by its own picture. */

:root {
  --wall: #5b1a22;   /* today's wall colour, set by the page each day */
  --chalk: #f1ece1;
  --ink: #171311;
  --f-text: Newsreader, Georgia, 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --edge: clamp(20px, 3.4vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; background: var(--wall); color: var(--chalk); font: 300 19px/1.5 var(--f-text); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #e9c46a; outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font: 500 10.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .16em; }

/* Masthead: stays in place while the rooms pass under it */
.top { position: fixed; left: 0; right: 0; top: 0; z-index: 20; display: flex; align-items: baseline; gap: clamp(12px, 1.8vw, 24px); padding: 22px var(--edge); font: 500 10.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .16em; pointer-events: none; text-shadow: 0 1px 14px rgba(0,0,0,.35); }
.top > * { pointer-events: auto; }
.top .brand { font: 400 22px/1 var(--f-text); text-transform: none; letter-spacing: 0; text-decoration: none; margin-right: auto; }
.top a.nav { text-decoration: none; opacity: .72; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.top a.nav:hover { opacity: 1; }
.top a.nav[aria-current] { opacity: 1; border-bottom-color: currentColor; }
.top .adm { display: none; }
body.admin .top .adm { display: inline; }
.tune { opacity: .7; min-width: 5ch; text-align: right; }

/* The line along the bottom of every wall: where you are in the show */
.plan { position: absolute; left: var(--edge); right: var(--edge); bottom: 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; z-index: 3; }
.plan > :last-child { text-align: right; }
.ticks { display: flex; gap: 9px; align-items: center; }
.ticks i { width: 22px; height: 2px; background: currentColor; opacity: .35; }
.ticks i.on { opacity: 1; height: 8px; }

/* The title wall */
.title { position: relative; min-height: 100vh; min-height: 100svh; scroll-snap-align: start; display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(30px, 5vw, 70px); align-items: end; padding: 130px var(--edge) 104px; }
.title .no { font: 300 clamp(150px, 24vw, 330px)/.74 var(--f-text); letter-spacing: -.05em; margin: 0 0 0 -.04em; }
.title h1 { font: 300 clamp(44px, 6vw, 88px)/.98 var(--f-text); letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.title .when { margin: 30px 0 0; }
.title .intro { font-size: 21px; line-height: 1.42; max-width: 30em; margin: 18px 0 0; opacity: .92; }
.ask { font: italic 300 22px/1.36 var(--f-text); max-width: 26em; margin: 16px 0 0; }
.waiting { font: italic 300 24px/1.3 var(--f-text); opacity: .8; margin: 0; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(241,236,225,.5); }
.list li { display: grid; grid-template-columns: 40px minmax(90px, 128px) 1fr auto; gap: 12px; align-items: baseline; padding: 13px 0 12px; border-bottom: 1px solid rgba(241,236,225,.28); }
.list .lt { font: 400 22px/1.22 var(--f-text); text-decoration: none; text-wrap: balance; }
.list .lt:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.list .by { opacity: .75; text-align: right; }

/* A piece: shared parts */
/* A room. The picture is blurred right out to make the light, then hung sharp in a mount. */
.room { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; scroll-snap-align: start; background: var(--light, #33302c); isolation: isolate; }
.room .light { position: absolute; inset: -120px; z-index: -2; background-size: cover; background-position: center; filter: blur(70px) saturate(1.55) brightness(.66); transform: scale(1.3); }
.room .veil { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 34% 46%, rgba(0,0,0,.06) 20%, rgba(0,0,0,.42) 100%); }
.room.plain { background: #25211e; }
.room.plain .veil { background: radial-gradient(ellipse at 34% 46%, rgba(255,255,255,.05), rgba(0,0,0,.3) 100%); }
.hang { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(28px, 4.6vw, 64px); padding: 104px var(--edge) 104px clamp(20px, 6.8vw, 96px); }
.hang.one { grid-template-columns: minmax(0, 720px); justify-content: center; }
.work { justify-self: center; display: block; background: var(--chalk); padding: clamp(12px, 1.9vw, 26px); box-shadow: 0 40px 70px -24px rgba(0,0,0,.62), 0 2px 0 rgba(0,0,0,.25); text-decoration: none; }
.work img { display: block; max-width: min(100%, 620px); max-height: min(58vh, 460px); width: auto; height: auto; }
.work.plate { width: min(100%, 440px); aspect-ratio: 4 / 3; display: grid; align-items: end; color: var(--ink); }
.work.plate span { font: 300 clamp(24px, 2.8vw, 38px)/1.06 var(--f-text); letter-spacing: -.01em; text-wrap: balance; }
.label { max-width: 26em; min-width: 0; }
.label h2 { font: 300 clamp(30px, 3.4vw, 48px)/1.06 var(--f-text); margin: 14px 0 16px; letter-spacing: -.015em; text-wrap: balance; }
.label h2 a { text-decoration: none; }
.label > p { font-size: 19px; line-height: 1.45; margin: 0 0 22px; opacity: .93; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.label q { display: block; quotes: none; font: 300 clamp(24px, 2.6vw, 34px)/1.25 var(--f-text); margin: 12px 0 10px; }
.label q::before { content: '“'; } .label q::after { content: '”'; }
.acts { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.go { font: 500 10.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .16em; background: none; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; padding: 0 0 5px; cursor: pointer; text-decoration: none; display: inline-block; }
.go:hover { opacity: .75; }
.go[disabled] { opacity: .4; cursor: default; }
.mine { margin-top: 22px; }
.note { display: block; width: 100%; margin-top: 14px; border: 1px solid rgba(241,236,225,.55); background: rgba(0,0,0,.18); color: var(--chalk); padding: 10px 12px; font: 300 17px/1.4 var(--f-text); resize: vertical; min-height: 44px; border-radius: 0; }
.note::placeholder { color: rgba(241,236,225,.6); font-style: italic; }
.then { margin: 12px 0 0; padding-left: 12px; border-left: 2px solid rgba(241,236,225,.6); font-size: 17px; line-height: 1.4; }
.then small { display: block; opacity: .7; }
.also { margin-top: 18px; }
.also summary { cursor: pointer; opacity: .8; }
.also ul { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 1px solid rgba(241,236,225,.5); font-size: 16px; line-height: 1.35; }
.also li { margin: 0 0 7px; }
.also small { opacity: .7; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 26px; }
.chip { font: 500 10.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .16em; background: none; border: 0; padding: 0 0 3px; border-bottom: 1px solid transparent; cursor: pointer; opacity: .65; }
.chip[aria-pressed="true"] { opacity: 1; border-bottom-color: currentColor; }

/* The way out */
.exit { position: relative; min-height: 78vh; scroll-snap-align: start; background: var(--ink); display: grid; place-items: center; text-align: center; padding: 100px var(--edge); }
.exit h2 { font: italic 300 clamp(38px, 5vw, 64px)/1 var(--f-text); margin: 0 0 18px; }
.exit p { font-size: 21px; max-width: 30em; margin: 0 auto 30px; opacity: .8; }
.out { display: flex; gap: 26px; justify-content: center; }
.lookback { min-height: 0; padding: 70px var(--edge); }
.back-in { text-align: left; width: min(100%, 640px); }
.back-in .out { justify-content: flex-start; margin-top: 30px; }

/* Later additions */
/* On list pages the menu gets a band of wall colour behind it, so rows do not show through as they scroll under. */
body:has(.page) .top { background: linear-gradient(to bottom, var(--wall) 62%, transparent); padding-bottom: 34px; }
/* A path that has not opened yet */
.list li.soon { opacity: .5; }
.list li.soon .lt { font-style: italic; }
/* Ordinary pages on the day's wall */
.page { min-height: 100vh; padding: 132px var(--edge) 96px; max-width: 1180px; }
.page h1 { font: 300 clamp(60px, 10vw, 132px)/.86 var(--f-text); letter-spacing: -.035em; margin: 0 0 20px -.03em; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; min-height: 18px; margin-bottom: 42px; opacity: .85; }
.meta-line .chips { margin: 0; }
.sub { font: italic 300 30px/1 var(--f-text); margin: 64px 0 18px; }
.rows li { grid-template-columns: minmax(110px, 190px) 1fr auto auto; }
.rows .extra { margin-top: 10px; max-width: 34em; }
.more { margin: 34px 0 0; }
.prose { max-width: 27em; font-size: clamp(21px, 2.1vw, 26px); line-height: 1.45; }
.prose p { margin: 0 0 1em; }
.colophon { margin-top: 56px; opacity: .7; line-height: 2.1; }

/* The back office: Shelf, Taste, Sources, Yours */
.panel { border-top: 1px solid rgba(241,236,225,.5); padding: 18px 0 30px; }
.field-label { display: block; margin-bottom: 10px; opacity: .8; }
.row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: baseline; }
.field { flex: 1 1 220px; min-width: 0; border: 0; border-bottom: 1px solid rgba(241,236,225,.7); background: transparent; padding: 8px 0; font: 300 19px/1.3 var(--f-text); border-radius: 0; }
select.field { flex: 0 1 180px; } select.field option { color: #111; }
.msg { font: italic 300 17px/1.4 var(--f-text); opacity: .8; margin: 12px 0 0; }
.msg.bad { color: #ffb4a8; opacity: 1; }
.said { font: 300 clamp(26px, 3.2vw, 40px)/1.14 var(--f-text); max-width: 26em; margin: 0 0 34px; text-wrap: balance; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 44px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 9.5em 1fr 2.2em; gap: 12px; align-items: center; font: 500 10.5px/2.5 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; }
.bars i { height: 2px; background: linear-gradient(to right, currentColor var(--p, 0%), rgba(241,236,225,.22) 0); }
.bars li > :last-child { text-align: right; }
.words { display: flex; flex-wrap: wrap; gap: 4px 16px; font-style: italic; }
.entry { border-top: 1px solid rgba(241,236,225,.28); padding: 14px 0; }
.entry q { display: block; quotes: none; font: italic 300 22px/1.32 var(--f-text); margin-bottom: 6px; }
.entry small { opacity: .7; }
.tier-h { font: 500 10.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .16em; opacity: .7; margin: 18px 0 6px; }
.sec-h { font: 300 30px/1 var(--f-text); margin: 0 0 6px; }
.src-list { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: 40px; }
.src { display: flex; align-items: baseline; gap: 8px; break-inside: avoid; padding: 4px 0; font-size: 17px; }
.src label { display: flex; gap: 9px; align-items: baseline; min-width: 0; cursor: pointer; }
.src input { accent-color: var(--chalk); }
.tag { font: 500 9.5px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; opacity: .6; margin-left: auto; text-align: right; }
.tag.bad { color: #ffb4a8; opacity: 1; }
.x { background: none; border: 0; cursor: pointer; opacity: .5; padding: 0 2px; }
.x:hover { opacity: 1; }
.order { list-style: none; margin: 0; padding: 0; }
.order li { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.order li span { flex: 1; } .order li i { display: none; }
.stars { display: flex; gap: 2px; }
.star { background: none; border: 0; cursor: pointer; font-size: 17px; opacity: .3; padding: 0 2px; }
.star.lit { opacity: 1; }
.pill { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 30; background: var(--chalk); color: var(--ink); border: 0; padding: 12px 16px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pill.warn { background: #b3261e; color: #fff; cursor: default; }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; row-gap: 6px; }
  .title { grid-template-columns: 1fr; align-items: start; padding-top: 150px; }
  .hang { grid-template-columns: 1fr; padding: 150px var(--edge) 110px; align-content: center; }
  .work { justify-self: start; }
  .list li { grid-template-columns: 30px 1fr; }
  .list li > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .list li > :nth-child(3) { grid-column: 2; }
  .list li > :nth-child(n+4) { grid-column: 2; text-align: left; }
  .plan { grid-template-columns: 1fr auto; } .plan .ticks { display: none; }
}
/* On a phone the name takes its own line and the menu sits in one row under it */
@media (max-width: 560px) { .top .brand { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; scroll-snap-type: none; } }
