/* Hallmark: Evensong piece pages · direction: concert programme read at night (DESIGN.md, locked) · genre: editorial · mode: Inform · job: tell the story of one piece, then open it in the app · signature: the opening bars printed on a paper card */
/* The piece pages (music/, musique/): a programme note for each piece, in the landing's night look (DESIGN.md).
   Built by music/build.mjs; the same tokens and type as index.html. */
:root {
  --ink: #14120E; --wood: #1C1914; --rule: #3A3328; --rule-strong: #ECE3CF;
  --text: #ECE3CF; --muted: #B9AE95; --faint: #958B76; --brass: #D2A95E; --on-accent: #14120E;
  --paper: #F3E9D3; --p-ink: #1E1A14; --p-muted: #4F4639; --p-rule: #C2AF8A; --p-brass: #7E5612;
  --f-display: 'IM Fell English', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --f-ui: 'Jost', 'Avenir Next', 'Segoe UI', sans-serif;
  --measure: 1180px;
  color-scheme: dark;
}
@font-face { font-family: 'IM Fell English'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/im-fell-english-normal-400.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/im-fell-english-italic-400.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jost-normal-400.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jost-normal-500.woff2) format('woff2'); }

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--ink); color: var(--text); font: 17px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; font-synthesis: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 400; line-height: 1.06; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(var(--measure), 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 24px; border: 1px solid var(--text); background: var(--text); color: var(--ink); font: 500 16px/1 var(--f-ui); text-decoration: none; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.btn:hover { background: var(--brass); border-color: var(--brass); color: var(--on-accent); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.link { color: var(--brass); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { color: var(--text); }

.mast-bar { position: sticky; top: 0; z-index: 30; background: var(--ink); border-bottom: 1px solid var(--rule); }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.brand img { height: 40px; width: auto; }
.mast-r { display: flex; align-items: center; gap: 20px; }
.lang { font-size: 15px; color: var(--muted); text-decoration: none; }
.lang:hover { color: var(--brass); }
@media (max-width: 480px) { .brand img { height: 32px; } .mast-r { gap: 14px; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-size: 14.5px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brass); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--rule); }

/* the head of the note: what it is, who wrote it, when */
.note-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end; padding: clamp(28px, 5vw, 56px) 0 24px; border-bottom: 1px solid var(--rule-strong); }
.note-head h1 { font-size: clamp(40px, 6vw, 76px); }
.byline { margin-top: 14px; font: italic 400 clamp(20px, 2.2vw, 26px)/1.3 var(--f-display); color: var(--muted); }
.note-act { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.note-act p { color: var(--muted); font-size: 15.5px; max-width: 40ch; }
@media (max-width: 820px) { .note-head { grid-template-columns: minmax(0, 1fr); } }

/* the opening bars, engraved by Evensong itself and printed on a card */
.card { margin: clamp(32px, 5vw, 56px) 0 0; background: var(--paper); color: var(--p-ink); padding: clamp(16px, 3vw, 32px); border: 1px solid var(--p-rule); }
.card img { width: 100%; max-height: 360px; object-fit: contain; object-position: left center; }
.card figcaption { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--p-rule); font-size: 14.5px; color: var(--p-muted); }

/* the text of the note beside its facts */
.body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px 64px; margin-top: clamp(40px, 6vw, 72px); }
.prose { display: flex; flex-direction: column; gap: 20px; max-width: 64ch; }
.prose .lead { font: 400 clamp(22px, 2.4vw, 28px)/1.35 var(--f-display); color: var(--text); }
.prose p { color: var(--muted); }
.prose h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 20px; }
.prose ol { counter-reset: f; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.prose ol li { counter-increment: f; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.prose ol li::before { content: counter(f, lower-roman) '.'; font: italic 400 20px/1.3 var(--f-display); color: var(--brass); }
.prose blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--brass); font: italic 400 21px/1.45 var(--f-display); color: var(--text); }
.side dl { margin: 0; border-top: 1px solid var(--rule-strong); }
.side dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.side dt { color: var(--faint); font-size: 15px; }
.side dd { margin: 0; }
.side h2 { font-size: 26px; margin: 36px 0 12px; }
.levels li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.levels li span { color: var(--muted); font-size: 15px; }
.dots { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--brass); }
.dots i.on { background: var(--brass); }
@media (max-width: 820px) { .body { grid-template-columns: minmax(0, 1fr); } }

/* more to play */
.more { margin-top: clamp(64px, 9vw, 112px); }
.more h2 { font-size: clamp(32px, 4vw, 48px); padding-bottom: 16px; border-bottom: 1px solid var(--rule-strong); }
.list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.list a { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.list a b { font: 400 22px/1.2 var(--f-display); }
.list a span { color: var(--faint); font-size: 15px; }
.list a:hover b { color: var(--brass); }
@media (max-width: 900px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .list { grid-template-columns: minmax(0, 1fr); } }

/* the index of all pieces */
.cat { margin-top: clamp(48px, 7vw, 80px); }
.cat h2 { font-size: clamp(30px, 3.6vw, 44px); padding-bottom: 14px; border-bottom: 1px solid var(--rule-strong); }
.cat > p { color: var(--muted); margin-top: 12px; max-width: 60ch; }

footer { margin-top: clamp(72px, 10vw, 128px); padding: 28px 0 40px; border-top: 1px solid var(--rule); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; font-size: 15px; color: var(--faint); }
.foot b { font: 400 22px/1 var(--f-display); color: var(--text); }
.foot a { color: var(--muted); }
