/* Old Standard, the films' own typeface for their titles, quotations and credits (tools/brand.py says why). */
@font-face {
  font-family: 'Old Standard';
  src: url('/fonts/OldStandard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Old Standard';
  src: url('/fonts/OldStandard-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Old Standard';
  src: url('/fonts/OldStandard-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* The corridor is ink. Each film's wall is painted its own colour, its accent deepened (build.mjs, wallOf). The one
   vermilion is the footnote number in the name (tools/brand.py). */
:root {
  --base: #24211E;
  --wall: var(--base);
  --card: #F4F0E6;
  --text: #EDE7DA;
  --quiet: #CFC8BA;
  --ink: #22262C;
  --label: #5A5248;
  --rule: rgba(237, 231, 218, 0.22);
  --accent: #8C3A2A;
  --call: #FE4A00;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: 'Old Standard', Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
  font-variant-numeric: lining-nums;
}
a { color: var(--text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.card :focus-visible { outline-color: var(--ink); }
img, video { display: block; max-width: 100%; height: auto; }
p, h1, h2, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* The type: five sizes, one face, Old Standard. Display for the page's name, title for a heading, lede for the opening words,
   the body, and small for labels, notes and credits. */
.display { font-size: 88px; line-height: 1.02; font-weight: 400; letter-spacing: -0.01em; }
.title { font-size: 28px; line-height: 1.15; font-weight: 700; }
.title a { text-decoration: none; }
.band-text .title a { display: inline-flex; align-items: center; min-height: 44px; }
.title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.lede { font-size: 23px; line-height: 1.45; }
.for, .sung { font-style: italic; }
.small { font-size: 16px; line-height: 1.5; }

/* The name and the header */
.top {
  max-width: 1240px; margin: 0 auto; padding: 24px 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.brand svg { display: block; height: 30px; width: auto; }
.brand .ink { fill: var(--text); }
.brand .call { fill: var(--call); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 17px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a[aria-current] { text-decoration: none; }

/* The home page: the newest film's work across the top, with its name on a label */
.lead { position: relative; margin: 0; }
.lead > a { display: block; }
figure { margin: 0; }
.credit-line { margin-top: 10px; color: var(--quiet); }
.lead img { width: 100%; height: min(52vh, 520px); object-fit: cover; }
.lead-cap {
  position: absolute; left: 40px; bottom: 0; max-width: calc(100% - 80px);
  display: flex; flex-direction: column; padding: 4px 18px 10px; background: var(--base); font-size: 17px; line-height: 1.35;
}
.lead-cap a { display: inline-flex; align-items: center; min-height: 44px; }
.lead-cap .small { color: var(--quiet); }
.intro { padding-top: 40px; padding-bottom: 72px; }
.intro .display { max-width: 1040px; }
.intro .lede { max-width: 760px; margin-top: 28px; }

.filters { display: none; flex-wrap: wrap; gap: 10px; padding-bottom: 32px; }
.js .filters { display: flex; }
.filters button {
  min-height: 44px; padding: 0 18px;
  border: 1px solid rgba(237, 231, 218, 0.55); background: transparent; color: var(--text);
  font: inherit; font-size: 17px; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.bands li[hidden] { display: none; }

/* Each room on its own wall: the work large, its name, and three frames from its film */
.band { background: var(--wall); }
.band-in {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start;
  padding-top: 72px; padding-bottom: 72px;
}
.band:nth-child(even) .band-work { order: 2; }
.band-work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.band-work .credit-line { margin-top: 10px; }
.band-text .for { margin-top: 12px; }
.band-text .small { margin-top: 10px; color: var(--quiet); }
.tile-count:empty { display: none; }
.watch-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: 17px; }
.strip { display: flex; gap: 12px; margin-top: 28px; }
.strip li { width: 128px; }
.frame { position: relative; display: block; color: var(--quiet); text-decoration: none; }
.frame img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.strip .frame img { aspect-ratio: 3 / 4; object-position: 50% 38%; }
.frame .at { display: block; margin-top: 4px; font-size: 16px; line-height: 1.5; }
.frame:hover .at { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* A room: painted its own colour, the work across the top on a laptop, then the film beside the words */
.room { background: var(--wall); padding-bottom: 72px; }
.room-lead img { width: 100%; height: min(56vh, 520px); object-fit: cover; }
.room-title { padding-top: 48px; padding-bottom: 40px; }
.room-title .for { margin-top: 16px; max-width: 760px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 640px); gap: 64px; align-items: start; }
.room-work { position: sticky; top: 24px; }
.room-work video { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; background: #000; }
.room-work video:fullscreen { background: #000; }
.buttons, .votes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.votes { margin-top: 10px; }
.votes[hidden] { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 96px; padding: 0 20px;
  border: 1.5px solid var(--text); background: transparent; color: var(--text);
  font: inherit; font-size: 17px; text-decoration: none; cursor: pointer;
}
.btn.solid { background: var(--text); color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.btn[hidden] { display: none; }
.btn span { font-variant-numeric: lining-nums tabular-nums; }
.votes .btn { min-width: 0; }
.votes .btn:disabled { opacity: 0.6; cursor: default; }
.length, .plays, .time { color: var(--quiet); }
.player { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.player[hidden] { display: none; }
.bar { position: relative; flex: 1; height: 28px; cursor: pointer; }
.bar::before { content: ''; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--rule); }
.bar span { position: absolute; left: 0; top: 12px; height: 4px; width: 0; background: var(--text); }

.wall-text { margin-top: 36px; }
.wall-text p + p { margin-top: 16px; }
.card { background: var(--card); color: var(--ink); }
.card a { color: var(--ink); }
.label { margin-top: 36px; padding: 20px 22px; color: var(--label); }
.label p + p { margin-top: 10px; }

.moments, .notes, .lyrics { margin-top: 56px; }
.moments .title, .lyrics .title { margin-bottom: 20px; }
.notes .title { margin-bottom: 8px; }
.notes > .small { color: var(--quiet); margin-bottom: 4px; }
.moment-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.moment-list .sung { margin-top: 8px; }
.notes-list { margin-top: 12px; }
.note { padding: 20px 0; border-top: 1px solid var(--rule); }
.note.has-frame { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; align-items: start; }
.gloss { margin-top: 6px; color: var(--quiet); }
.gloss.invented { color: var(--text); font-style: italic; }
.src { margin-top: 6px; }
.src a { color: var(--quiet); }
.js .notes:not(.open) .notes-list { display: none; }
.more {
  display: none; align-items: center; min-height: 44px; margin-top: 4px; padding: 0;
  background: none; border: 0; color: var(--text); font: inherit; font-size: 17px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; cursor: pointer;
}
.js .more { display: inline-flex; }
.js .open .more { display: none; }
.lyrics p { font-style: italic; }
.lyrics p + p { margin-top: 18px; }
.lyrics .teaser { display: none; }
.js .lyrics:not(.open) .teaser { display: block; }
.js .lyrics:not(.open) .full { display: none; }

.next {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); color: var(--text); text-decoration: none;
}
.next img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.next-text { display: flex; flex-direction: column; gap: 6px; }
.next-text .small { color: var(--quiet); }
.next:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* About, and the plain pages */
.whats-on { padding-top: 40px; padding-bottom: 72px; }
.whats-on > .title { margin-bottom: 24px; }
.about-body { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.about-body .display { max-width: 1000px; }
.about-body p { max-width: 600px; }   /* Old Standard sets about 8.5 px a character at 19 px: 76 to 80 a line at 680 to 720 px, where 75 is the Designer test's comfortable limit (R1) */

/* The footer */
.foot { border-top: 1px solid var(--rule); }
.foot .wrap { padding-top: 28px; padding-bottom: 44px; color: var(--quiet); }
.foot a { color: var(--quiet); }
.credit { max-width: 760px; font-size: 16px; line-height: 1.5; margin-bottom: 12px; }
.maker { margin-top: 8px; font-size: 16px; }

@media (max-width: 1000px) {
  .display { font-size: 64px; }
  .room-grid { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 40px; }
  .band-in { gap: 36px; }
}
@media (max-width: 820px) {
  .band-in { grid-template-columns: minmax(0, 1fr); }
  .band:nth-child(even) .band-work { order: 0; }
}
/* On a phone the film leads: the work's own picture across the top is left out, since the film opens on it */
@media (max-width: 720px) {
  .room-lead { display: none; }
  .room-title { padding-top: 16px; padding-bottom: 20px; }
  .room-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .room-work { position: static; margin: 0 -40px; }
  .room-text { padding-top: 24px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .top { padding: 14px 20px; }
  .brand svg { height: 24px; }
  .site-nav { gap: 0 20px; }
  .display { font-size: 44px; line-height: 1.05; }
  .title { font-size: 24px; }
  .lede { font-size: 20px; }
  .small, .frame .at, .credit, .maker { font-size: 15px; }
  .lead img { height: 56vh; }
  .lead-cap { left: 0; max-width: 100%; padding: 0 20px 8px; }
  .intro { padding-top: 20px; padding-bottom: 48px; }
  .intro .lede { margin-top: 20px; }
  .band-in { gap: 24px; padding-top: 0; padding-bottom: 48px; }
  .band-work a { display: block; margin: 0 -20px; }
  .strip { gap: 12px; margin-top: 20px; }
  .strip li { width: calc((100% - 12px) / 2); }
  .strip li:nth-child(n+3) { display: none; }
  .room-work { margin: 0 -20px; }
  .note.has-frame { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
  .moment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  /* Old Standard runs a film's page about a tenth of a screen longer on a phone than EB Garamond did, which took
     the Brontës page under 1.5 pictures a screen (the Designer test's P4); these spaces give it back. */
  .room { padding-bottom: 40px; }
  .room-title { padding-bottom: 12px; }
  .room-text { padding-top: 16px; }
  .next { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .next img { margin: 0 -20px; width: calc(100% + 40px); max-width: none; }
  .whats-on { padding-top: 24px; }
  .about-body { padding-top: 40px; }
}

/* About: a line from a film with its footnote, set as a book sets one, and the credits for every picture and the type. */
.specimen { margin: 8px 0; max-width: 600px; }
.specimen blockquote { margin: 0; font-size: 23px; line-height: 1.4; font-style: italic; }
.call { color: var(--call); font-style: normal; font-size: max(0.62em, 12px); line-height: 0; vertical-align: super; margin-left: 0.08em; }
.footrule { width: 30%; max-width: 160px; margin: 22px 0 12px; border: 0; border-top: 1px solid var(--text); }
.specimen figcaption { color: var(--quiet); }
.about-credits { padding-top: 32px; padding-bottom: 72px; }
.about-credits .small { max-width: 600px; margin-top: 16px; color: var(--quiet); }

/* How we checked a film: one claim after another, each with its source's own words. The list keeps to about 75
   characters a line (the Designer test's R1), and the page's name is set as large as a film's. */
.checked .display { margin-bottom: 24px; max-width: 1000px; }
.checked .lede, .checked .check-list, .checked .jumps { max-width: 540px; }
.jumps { margin-top: 8px; }
.jumps ul { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px; }
.jumps a, .checked .back a, .check-list .src a { display: inline-flex; align-items: center; min-height: 44px; }
.check-part { margin-top: 40px; }
.check-part h2 { font-weight: 700; }
.check-part .check-list { margin-top: 8px; }
.check-list { list-style: none; padding: 0; margin: 2rem 0; }
.check-list .check { padding: 1rem 0; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 20%, transparent); }
.check-list .check p { margin: 0.35rem 0; }
.check-list blockquote { margin: 0.5rem 0; padding-left: 0.9rem; border-left: 3px solid color-mix(in srgb, currentColor 35%, transparent); font-style: italic; overflow-wrap: anywhere; }
.check-list .src a { overflow-wrap: anywhere; }
