/*
  Bonington Players: the site's one stylesheet, built on the tokens in DESIGN.md ("The Lit Stage").
  Bonos Blue is the frame, the posters and photos are the colour, and Straw Gel is the cue light: it marks only
  Book tickets, Now showing, award dots and the focus ring. Flat throughout: only the poster casts a shadow.
*/

/* ---------- Fonts ----------
   The @font-face rules are in the page's head (Pages/Shared/_Layout.cshtml), where the fonts' fingerprinted addresses
   are known, so that they're cached for good. Self-hosted and subset to Latin: see /fonts/README.md. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Colour: the light theme */
  --paper: #f4f7fc;
  --paper-deep: #e8edf7;
  --ink: #12192f;
  --muted: #505869;
  --rule: #d6dbe4;
  --blue: #1f40be;          /* the frame: hero band, booking panel */
  --on-blue: #f4f7fc;
  --on-blue-muted: #cbd8f3; /* Blue Haze */
  --gel: #fbd452;           /* Straw Gel, the cue light */
  --on-gel: #12192f;
  --link: #1f40be;
  --footer-ground: #12192f;
  --footer-text: #ebeef5;
  --footer-muted: #a9b1c2;
  --halo: #12192f;          /* the focus ring's halo, Ink in both themes so the gel reads on blue and paper alike */

  /* Type */
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --step--1: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);      /* Small: the smallest text on the site */
  --step-0: clamp(1.1875rem, 1.12rem + 0.3vw, 1.3125rem);  /* Body: never below 19px */
  --step-1: clamp(1.5rem, 1.35rem + 0.7vw, 1.875rem);      /* Subtitle */
  --step-2: clamp(2rem, 1.7rem + 1.4vw, 2.875rem);         /* Title */
  --step-3: clamp(2.75rem, 2rem + 3.6vw, 5.25rem);         /* Headline */
  --step-4: clamp(3.25rem, 2.1rem + 5.6vw, 7.5rem);        /* Display */

  /* Space */
  --gutter: clamp(16px, 4vw, 48px);
  --stack-sm: 0.5rem;
  --stack-md: 1.25rem;
  --stack-lg: 2.5rem;
  --section: clamp(3rem, 6vw, 5.5rem);
  --page-max: 1240px;

  /* Elevation: the poster only */
  --shadow-hung: 0 1px 0 oklch(0% 0 0 / 0.1), 0 24px 48px -16px oklch(15% 0.08 266 / 0.55);
  --shadow-resting: 0 20px 40px -18px oklch(15% 0.08 266 / 0.5);

  /* Motion: the button lift, and nothing else */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

/* The Night palette: a true dark theme, following the reader's device. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0c111f;       /* Night Ground */
    --paper-deep: #161c2d;  /* Night Surface */
    --ink: #ebeef5;         /* Night Text */
    --muted: #a9b1c2;       /* Night Muted */
    --rule: #2b3245;        /* Night Rule */
    --blue: #132d94;        /* Night Blue */
    --link: #a0bdff;        /* Night Link */
    --footer-ground: #070b15; /* Night Footer */
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 68%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
  hyphens: auto;
}

main { flex: 1 0 auto; }

p, ul, ol, blockquote, figure, address { margin: 0; }
p, li, blockquote, address { max-width: 65ch; }
address { font-style: normal; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--link);
  overflow-wrap: anywhere;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

/* The focus ring, everywhere: 3px Straw Gel at 3px offset, with a 6px Ink halo. */
:focus-visible {
  outline: 3px solid var(--gel);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--halo);
}

time, .num { font-variant-numeric: tabular-nums; }

code { overflow-wrap: anywhere; }

/* Grid and flex items may shrink below their longest word, so large text wraps rather than scrolling sideways. */
.page-body, .prose, .production-body, .production-head, .hero-copy, .booking-panel, .booking-closed {
  grid-template-columns: minmax(0, 1fr);
}
.hero-grid > *, .production > *, .pair > *, .site-footer .wrap > *, .masthead .wrap > * { min-width: 0; }

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Secondary actions: bold underlined text links. There's no secondary button. */
.more { font-weight: 700; }

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Box Office strip ---------- */

.box-office {
  background: var(--paper-deep);
  font-size: var(--step--1);
}
.box-office p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  max-width: none;
  padding-block: 0.5rem;
}
.box-office a { color: var(--ink); }
.box-office .phone { font-weight: 700; }

/* ---------- Masthead ---------- */

.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.9rem;
}
.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.005em;
}
.wordmark span { color: var(--link); }
.strapline { font-size: var(--step--1); color: var(--muted); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding-block: 0.4rem;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a[aria-current="page"] { border-bottom-color: var(--link); }

/* ---------- Book tickets and Now showing: the cue light ---------- */

.btn {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.6rem;
  padding: 16px 26px 17px;
  border-radius: 4px;
  background: var(--gel);
  color: var(--on-gel);
  font-family: var(--font-display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1;
  text-decoration: none;
  transition: transform 250ms var(--ease-out-quint);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 0.9em; height: 0.9em; flex: none; }

.chip {
  display: inline-block;
  justify-self: start;
  padding: 5px 10px;
  border-radius: 3px;
  background: var(--gel);
  color: var(--on-gel);
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Sections and page titles ---------- */

.section { padding-block: var(--section); }
.section + .section, .production + .section { border-top: 1px solid var(--rule); }

.page-head { padding-block: clamp(1.75rem, 4vw, 3rem) 0; }
.page-head h1 { font-size: var(--step-3); }
.page-head p { margin-top: var(--stack-sm); color: var(--muted); }

.page-body {
  display: grid;
  gap: var(--stack-lg);
  padding-block: clamp(2rem, 4vw, 3.5rem) var(--section);
}
.page-body + .page-body { padding-top: 0; }
.page-body.prose { gap: 1rem; }

.prose { display: grid; gap: 1rem; align-content: start; }

h2.title { font-size: var(--step-2); }
h2.subtitle, h3.subtitle { font-size: var(--step-1); font-stretch: 80%; line-height: 1; }

.meta { font-size: var(--step--1); color: var(--muted); }

.photo {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 4px;
}

/* ---------- The hero band: the Next Production on the homepage ---------- */

/* The band is the grid's first row, drawn full bleed behind the copy. The poster tops out level with the copy and
   sits inside the band, which runs on below whichever of the two is taller by the copy's bottom padding. */
.hero { overflow-x: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  isolation: isolate;
}
.hero-grid::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1;
  margin-inline: calc(50% - 50vw);
  background: var(--blue);
  z-index: -1;
}
.hero-grid:not(:has(.poster-hung)) > * { grid-column: 1 / -1; }

/* The poster hangs on the band like a sheet pinned to the set. Its margins match the copy's padding, so it tops out
   level with the kicker and always has blue below it. */
.poster-hung {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  max-width: 340px;
  margin-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4rem);
}
.poster-hung img {
  width: 100%;
  box-shadow: var(--shadow-hung);
  transform: rotate(-1.2deg);
}

.hero-copy {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: var(--stack-md);
  align-content: start;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4rem);
  /* The band's own blue behind the copy too, so its pale text is always on blue, even where the band is drawn only by
     the grid's ::before (which contrast checkers, and a browser that fails to paint it, don't see). */
  background: var(--blue);
  color: var(--on-blue);
}
.hero-copy a:not(.btn) { color: var(--on-blue); }

/* A plain band, for the coming-soon state. */
.band { background: var(--blue); color: var(--on-blue); }
.band a { color: var(--on-blue); }

.kicker {
  color: var(--on-blue-muted);
  font-size: var(--step--1);
  font-weight: 700;
}

.display {
  font-size: var(--step-4);
  font-stretch: 62%;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.015em;
}
.display a { color: inherit; text-decoration: none; }

/* What kind of play it is and who wrote it, under the title: Blue Haze on the band, Muted Ink on the paper. */
.byline {
  color: var(--on-blue-muted);
  font-family: var(--font-display);
  font-stretch: 95%;
  font-weight: 500;
  font-size: var(--step-1);
}
.production-head .byline { color: var(--muted); }

.run { font-weight: 700; }

.stubs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 34rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.stubs li {
  display: grid;
  padding: 9px 10px 10px;
  border: 1.5px solid oklch(97.5% 0.008 265 / 0.45);
  border-radius: 4px;
  line-height: 1.1;
  text-align: center;
}
.stub-day {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stub-date {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(2.2rem, 1.8rem + 1.5vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stub-time { font-size: 1rem; color: var(--on-blue-muted); }

.book {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: var(--stack-sm);
}
.book p { font-size: var(--step--1); color: var(--on-blue-muted); }
.book .phone {
  display: inline-block;
  color: var(--on-blue);
  font-size: var(--step-0);
  font-weight: 700;
}

/* Booking hasn't opened: the Box Office number takes over, set large. */
.phone-large {
  display: inline-block;
  font-family: var(--font-display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1;
}
.booking-closed { display: grid; gap: 0.75rem; }
.booking-closed p { color: var(--on-blue-muted); }
.booking-closed strong, .booking-closed a { color: var(--on-blue); }

/* The coming-soon state, in the band too. */
.coming-soon {
  display: grid;
  gap: var(--stack-md);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.coming-soon h2 { font-size: var(--step-3); }
.coming-soon p { color: var(--on-blue-muted); }
.coming-soon a { color: var(--on-blue); font-weight: 700; }

/* ---------- The homepage below the hero ---------- */

/* Join us: a statement and its link. */
.join { display: grid; gap: var(--stack-md); }
.join h2 { font-size: var(--step-3); }

/* Latest news and From the archive, as a pair. */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
}
.teaser { display: grid; gap: 0.75rem; align-content: start; }
.teaser h2 { font-size: var(--step-1); font-stretch: 80%; color: var(--muted); }
.teaser h3 { font-size: var(--step-2); }
.teaser h3 a { color: var(--ink); text-decoration: none; }
.teaser time { font-size: var(--step--1); color: var(--muted); }

.archive-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: start;
}
.archive-teaser .text { display: grid; gap: 0.6rem; }
.archive-teaser .poster-small { max-width: 220px; }
/* Uncropped: the Archive's posters came in as photos, so the first photo is often the poster. */
.archive-teaser .photo { aspect-ratio: auto 2 / 1; }

/* ---------- A Production: What's On, its own page and its preview ---------- */

.production {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.production > .production-body:only-child { grid-column: 1 / -1; }

/* Sticky in its own column, so it never covers the text or anything focused beside it. */
.production-poster {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-width: 340px;
}
.production-poster img {
  width: 100%;
  border-radius: 2px;
  box-shadow: var(--shadow-resting);
}

.production-body {
  display: grid;
  gap: var(--stack-lg);
  align-content: start;
}
.production-head { display: grid; gap: 1rem; }
.production-head .display a { color: var(--ink); }
.production-head h1 { font-size: var(--step-3); }
.production-body .kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  color: var(--muted);
}
.production-body section { display: grid; gap: 1rem; }

/* The booking panel: the only filled box on the page. */
.booking-panel {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 6px;
  background: var(--blue);
  color: var(--on-blue);
}
.booking-panel .panel-run {
  font-family: var(--font-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 0.98;
  text-wrap: balance;
  hyphens: auto;
}
.booking-panel p { color: var(--on-blue-muted); font-size: var(--step--1); }
.booking-panel .panel-run { color: var(--on-blue); }
.booking-panel a:not(.btn) { color: var(--on-blue); }
.booking-panel .phone { font-weight: 700; }
.booking-panel .phone-large { font-size: var(--step-2); }

/* Ruled rows, not cards: Performances, the Season, the Archive, the News. */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li {
  max-width: none;
  padding-block: 0.85rem;
  border-top: 1px solid var(--rule);
}
.rows > li:last-child { border-bottom: 1px solid var(--rule); }

.performances > li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.performances .day { font-weight: 700; }
.performances .time { color: var(--muted); }
/* Faded to Muted Ink rather than to 50% opacity, which would take the text below AA contrast. */
.performances .is-past .day { color: var(--muted); font-weight: 400; }
.performances .is-tonight .time { color: var(--ink); font-weight: 700; }

.season-rows > li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding-block: 1.25rem;
}
.season-rows .when {
  font-family: var(--font-display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1;
  color: var(--link);
}
.season-rows h3 { font-size: var(--step-2); }
.season-rows h3 a { color: var(--ink); text-decoration-thickness: 0.06em; }
.season-rows p { margin-top: 0.35rem; font-size: var(--step--1); color: var(--muted); }

.visiting { display: grid; gap: 0.5rem; }
.visiting address, .visiting p { font-size: var(--step--1); }

.poster-small { width: 100%; max-width: 220px; }

/* A page's one photo, whole and never enlarged: the News's photos are small originals, mostly portrait. */
.page-body > .photo {
  width: auto;
  max-width: min(100%, 50rem);
  aspect-ratio: auto;
}

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.photos a { display: block; border-radius: 4px; cursor: zoom-in; }

/* The photo viewer (js/photos.js): a gallery photo shown whole, never cropped or enlarged, on a dark ground. */
.photo-viewer {
  max-width: 100vw;
  max-height: 100dvh;
  padding: var(--stack-md);
  border: 0;
  background: transparent;
  color: var(--footer-text);
}
.photo-viewer::backdrop { background: rgb(7 11 21 / 0.94); }
:root:has(.photo-viewer[open]) { overflow: hidden; }

.photo-viewer figure { display: grid; justify-items: center; gap: var(--stack-sm); margin: 0; }
.photo-viewer img {
  width: auto;
  max-width: min(90vw, 100%);
  max-height: 75dvh;
  object-fit: contain;
  border-radius: 4px;
}
.photo-viewer figcaption { max-width: 65ch; text-align: center; }
.photo-viewer-count { color: var(--footer-muted); font-size: var(--step--1); white-space: nowrap; }

.photo-viewer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--stack-sm);
  margin-top: var(--stack-md);
}
.photo-viewer-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--footer-muted);
  border-radius: 4px;
  background: transparent;
  color: var(--footer-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.photo-viewer-controls button[hidden] { display: none; }

blockquote {
  padding-block: 0.25rem;
  font-family: var(--font-display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.2;
}
.quotes { display: grid; gap: 1.25rem; }

.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }

/* The award dot: Straw Gel, allowed for Awards. */
.awards li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.awards li::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--gel);
  transform: translateY(-0.1em);
}

/* The preview note: a plain ruled note, not an alert box. */
.note {
  display: grid;
  gap: 0.5rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding-block: 1rem;
  border-block: 1px solid var(--rule);
  font-size: var(--step--1);
}

/* ---------- The Archive and the News ---------- */

.archive-season { display: grid; gap: 1rem; }
.archive-season h2 { font-size: var(--step-2); }

.archive-rows > li { display: grid; gap: 0.2rem; }
.archive-rows .row-title {
  font-family: var(--font-display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.1;
  letter-spacing: normal; /* the Subtitle's, not the tighter spacing of the larger headings */
}
.archive-rows .row-title a { color: var(--ink); text-decoration-thickness: 0.06em; }
.archive-rows .row-meta { font-size: var(--step--1); color: var(--muted); }

.news-list > li { display: grid; gap: 0.35rem; padding-block: 1.25rem; }
.news-list .row-title {
  font-family: var(--font-display);
  font-stretch: 68%;
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1;
}
.news-list .row-title a { color: var(--ink); text-decoration-thickness: 0.06em; }
.news-list time { font-size: var(--step--1); color: var(--muted); }

/* ---------- Join Us ---------- */

/* The page opens as a statement: the Headline, then the introduction set large. */
.statement { display: grid; gap: 1rem; }
.statement p { color: var(--ink); }
.statement h1 + p { font-size: var(--step-1); line-height: 1.35; max-width: 40ch; }
.get-in-touch { gap: 1rem; }
.get-in-touch .phone { font-weight: 700; }

/* The one way to get in touch, as a secondary action: a bold underlined link a step up from the body and a step below
   the section's Title, with the address under it as plain body text for anyone who'd rather copy it. No Straw Gel:
   that's for Book tickets. */
.mail { display: grid; gap: 0.25rem; justify-items: start; }
.mail a { font-size: var(--step-1); font-weight: 700; line-height: 1.3; }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: var(--footer-ground);
  color: var(--footer-text);
  font-size: var(--step--1);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2rem;
}
.site-footer .wrap > * { display: grid; gap: 0.5rem; align-content: start; }
.site-footer h2, .site-footer .footer-name {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1;
  color: var(--footer-text);
}
.site-footer a { color: var(--footer-text); }
.site-footer .phone { font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer p, .site-footer li { max-width: 34ch; }
.site-footer .quiet { color: var(--footer-muted); }
/* A short name broken over two lines ("Oak & / Arrow Studios") reads as two links: it wraps whole, onto its own line. */
.site-footer .quiet a { white-space: nowrap; }
/* The website's credit: a line of its own along the bottom of the footer, under the columns and to the right. */
.site-footer .footer-credit {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--stack-lg);
}
.site-footer .footer-credit p { display: block; max-width: none; }

/* ---------- Narrow screens: stack, and let the nav wrap under the wordmark ---------- */

@media (max-width: 860px) {
  .hero-grid, .production, .pair { grid-template-columns: minmax(0, 1fr); }
  .hero-grid::before { grid-row: 1 / span 2; }
  .poster-hung { grid-row: 1; max-width: 240px; margin-bottom: 0; align-self: start; }
  .hero-copy { grid-column: 1; grid-row: 2; padding-block: var(--stack-lg); }
  .production-poster { position: static; max-width: 260px; }
  .season-rows > li { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .stubs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-teaser { grid-template-columns: minmax(0, 1fr); }
  .brand { flex-direction: column; }

  /* A phone's first screen must reach Book tickets, so the header gives up some air: the nav fits on one line at
     390px (it still wraps on narrower screens), and the Box Office strip's two lines sit closer. */
  .box-office p { gap: 0 1.5rem; padding-block: 0.35rem; }
  .masthead .wrap { padding-block: 0.75rem; }
  .site-nav ul { gap: 0.25rem 1rem; }

  /* The copy comes first, then the poster, hung from the band's foot so it still breaks out into the paper. */
  .hero-grid::before { grid-row: 1; }
  .hero-copy { grid-row: 1; padding-top: 2rem; }
  .poster-hung {
    grid-row: 2;
    position: relative;
    z-index: 1;
    margin-top: -1.5rem;
  }

  /* On What's On and a Production's page, the title and booking panel come before the poster: the body's parts join
     the article's own grid so the poster can follow the panel, ahead of the blurb. */
  .production { gap: var(--stack-lg); }
  .production-body { display: contents; }
  .production-head, .booking-panel { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .btn:hover { transform: none; }
}
