/* The Serious Wing: the visitor guide. A concertina leaflet, unfolded vertically,
   lying on the gallery floor. About 90% legible page, 10% paper object.
   Paper, folds, masthead and signs are shared with the gallery guide in guide.css. */

:root {
  --ink: #111111;
  --ink-soft: #3b3b3b;
  --ink-faint: #666666;
  --paper: #fbfaf7;
  --rule: rgba(17, 17, 17, 0.14);
  --floor: #b4b8bd;
  /* Archivo carries the display voice (condensed caps) and artwork titles (italic).
     Instrument Sans carries everything else. */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: 40px;
  --sheet: 936px;
  --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* The guide lies on the same polished concrete as the gallery. */
  background: var(--floor) url("floor.webp") 0 0 / 1152px 512px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.leaflet { background-image: url("../floor.webp"); }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

/* Display type stays in Archivo. */
.cover-name, .next a { font-family: var(--display); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.skip-link {
  position: absolute; left: var(--gutter); top: 12px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Top bar, on the floor ---------- */

.topbar {
  max-width: calc(var(--sheet) + 2 * var(--gutter));
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  font-size: 14px;
}
/* The way back to the gallery: a solid button on the floor, always the first thing. */
.topbar-back {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px 13px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 600; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 20px -12px rgba(0, 0, 0, 0.5);
  transition: background-color 150ms ease;
}
.topbar-back:hover { background: #333333; }
.topbar-back span { font-size: 18px; line-height: 1; transition: transform 150ms ease; }
.topbar-back:hover span { transform: translateX(-3px); }
.masthead-title a { text-underline-offset: 4px; }
.masthead-title a:hover { text-decoration-thickness: 2px; }

/* ---------- The sheet (paper, folds and signs come from guide.css) ---------- */

.sheet {
  max-width: var(--sheet);
  margin: 8px auto 40px;
}
/* Wider sheet, comfortable lines: running text keeps a reading measure. */
.panel > p, .panel > ul:not(.made), .panel > ol, .panel > h3, .panel > figure, .panel > blockquote, .panel > .compare, .panel > .note {
  max-width: var(--measure);
}

/* ---------- Cover panel ---------- */

.cover-name {
  margin-top: 40px !important;
  font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(64px, 12vw, 128px); line-height: 0.86; letter-spacing: -0.01em;
}
.cover-name--case { font-size: clamp(44px, 7vw, 76px); line-height: 0.92; }
.kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.cover-name + .kicker, .kicker + .cover-name { margin-top: 14px !important; }
.bridge { margin-top: 28px !important; font-size: 24px; line-height: 1.35; font-weight: 500; max-width: 600px; }
.standfirst { font-size: 19px; line-height: 1.5; max-width: 600px; color: var(--ink-soft); }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 17px; font-weight: 600; }

/* Facts panel, as on the exhibition entrance. */
.facts {
  margin-top: 32px !important; padding-top: 16px;
  border-top: 1px solid var(--ink);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px;
}
.facts dt {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.facts dd { margin-top: 4px; font-size: 17px; font-weight: 500; line-height: 1.4; }

/* "In this guide": the printed contents, linking to each panel. */
.contents { margin-top: 36px !important; }
.contents-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.contents ol {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.contents li { border-bottom: 1px solid var(--rule); }
.contents a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 12px 12px 0;
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.contents a:hover { text-decoration: underline; }
.contents-no { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }

/* ---------- Body copy ---------- */

.lead { font-size: 22px; line-height: 1.45; }
.soft { color: var(--ink-soft); }
.panel h3 { font-size: 21px; line-height: 1.25; font-weight: 700; font-stretch: 85%; }
.panel h3 + p { margin-top: 8px; }

/* Selected work: a list, each item marked with its spot colour. */
.work-list { list-style: none; padding: 0; }
.work-list > li { padding: 24px 0 24px 22px; border-top: 1px solid var(--rule); position: relative; }
.work-list > li:first-child { border-top: 0; padding-top: 0; }
.work-list > li::before {
  content: ""; position: absolute; left: 0; top: 30px; bottom: 30px; width: 5px;
  background: var(--spot, var(--rule));
}
.work-list > li:first-child::before { top: 6px; }
.work-list--plain > li { padding-left: 0; }
.work-list--plain > li::before { display: none; }
.work-title { font-size: 25px !important; line-height: 1.2; }
.work-title a { text-decoration: none; }
.work-title a:hover { text-decoration: underline; }
.work-meta { margin-top: 6px; font-size: 14px; color: var(--ink-faint); }
.work-body { margin-top: 10px; color: var(--ink-soft); }
.work-link { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 16px; }
.work-note { margin-top: 12px; font-size: 15px; color: var(--ink-faint); font-style: italic; }

.principles { list-style: none; padding: 0; display: grid; gap: 22px; }
.principles h3 { font-size: 20px; }

.made { list-style: none; padding: 0; display: grid; gap: 18px; }
.made li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding-top: 14px; border-top: 1px solid var(--rule); }
.made dt, .made .made-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: 3px;
}
.made p { color: var(--ink-soft); }

/* Numbered moves in a case study. */
.moves { list-style: none; padding: 0; counter-reset: move; }
.moves > li { counter-increment: move; position: relative; padding: 24px 0 24px 56px; border-top: 1px solid var(--rule); }
.moves > li:first-child { border-top: 0; padding-top: 0; }
.moves > li::before {
  content: counter(move, decimal-leading-zero);
  position: absolute; left: 0; top: 24px;
  font-size: 22px; font-weight: 800; font-stretch: 75%;
  color: var(--spot, var(--ink));
}
.moves > li:first-child::before { top: 0; }
.moves h3 { font-size: 20px; }
.moves p { margin-top: 8px; color: var(--ink-soft); }
.aside { margin-top: 10px !important; font-size: 15px; color: var(--ink-faint) !important; font-style: italic; }

.outcomes { list-style: none; padding: 0; display: grid; gap: 20px; }
.outcomes h3 { font-size: 19px; }
.outcomes p { margin-top: 4px; color: var(--ink-soft); }

.pullquote {
  padding: 6px 0 6px 22px; border-left: 4px solid var(--spot, var(--ink));
  font-size: 22px; line-height: 1.45; font-weight: 500;
}
.note {
  padding: 18px 20px; border: 1px solid var(--ink);
  font-size: 16px; color: var(--ink-soft);
}
.note strong { color: var(--ink); }

/* Simple data figures */
.figure-caption { margin-top: 10px; font-size: 14px; color: var(--ink-faint); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; max-width: 480px; }
.months span { height: 28px; border: 1px solid var(--ink); }
.months span.on { background: var(--ink); }
.bars { display: grid; gap: 10px; max-width: 520px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 15px; }
.bar-track { grid-column: 1 / -1; height: 14px; background: rgba(17, 17, 17, 0.08); }
.bar-fill { height: 100%; background: var(--ink); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.compare h3 { font-size: 18px; }
.compare p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }

/* ---------- Next leaflet / footer ---------- */

.next a { display: block; margin-top: 10px; text-decoration: none; font-size: clamp(28px, 4vw, 40px); line-height: 1.05; font-weight: 800; font-stretch: 75%; }
.next a:hover { text-decoration: underline; }

.footer {
  max-width: calc(var(--sheet) + 2 * var(--gutter));
  margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 8px var(--gutter) 40px;
  font-size: 14px; font-weight: 500;
}

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .topbar { padding: 16px var(--gutter); }
  .topbar-back { padding: 10px 16px 11px; font-size: 14px; }
  .contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet { margin: 0 0 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
  .bridge { font-size: 21px; }
  .standfirst, .lead, .pullquote { font-size: 18px; }
  .facts { grid-template-columns: 1fr; }
  .work-title { font-size: 22px !important; }
  .made li { grid-template-columns: 1fr; gap: 6px; }
  .moves > li { padding-left: 44px; }
  .compare { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topbar-back, .topbar-back span { transition: none; }
}

/* ---------- Print: the guide doubles as a CV ---------- */

@media print {
  body { background: none; font-size: 11pt; }
  .topbar, .skip-link, .footer, .contents { display: none; }
  .sheet { max-width: none; margin: 0; box-shadow: none; background: none; }
  .panel { padding: 14pt 0; background: none !important; box-shadow: none !important; }
  .panel + .panel { border-top: 0.5pt solid #999; }
  .cover-name { font-size: 54pt; }
  .sign { background: none; color: var(--ink); padding: 0; border-bottom: 1.5pt solid var(--ink); }
  .work-list > li, .moves > li, .principles li, .outcomes li, .made li { break-inside: avoid; }
  .contact-row a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; }
  a { text-decoration: none; }
}
