/* cridhe: black screen, projector white, edge-print amber */
:root {
  --bg: #0b0b0a; --film: #161511; --ink: #ebe5d6; --dim: #8d877a; --amber: #e3a13c; --line: #2a2823;
  --pad: clamp(16px, 3vw, 56px);
  --serif: "Cormorant Garamond", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
  color-scheme: dark;
}
html { font-size: clamp(15px, calc(0.55vw + 7px), 21px); scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--type); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; font: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover, .copy:hover { color: var(--amber); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }
.dim { color: var(--dim); }

/* film grain over everything */
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .5s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -2%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* top bar */
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.2rem var(--pad); font-size: .85rem; }
.mark { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; letter-spacing: .02em; }
.bar nav { display: flex; gap: 1.4rem; flex-wrap: wrap; text-transform: uppercase; letter-spacing: .12em; }
.bar nav a { color: var(--dim); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }

/* opening title card */
.open { text-align: center; padding: 14vh var(--pad) 10vh; }
.open.short { padding: 10vh var(--pad) 6vh; }
.credit { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--dim); margin-bottom: .6rem; }
.open h1 {
  font-family: var(--serif); font-weight: 500; text-transform: uppercase;
  font-size: clamp(3.2rem, 11vw, 11rem); line-height: .95; letter-spacing: .14em; margin-right: -.14em;
}
.log { margin-top: 1.4rem; color: var(--dim); }

/* letterboxed frame */
.scope { position: relative; background: #000; padding: 3.2vw 0; }
.scope .pic { overflow: hidden; }
.scope img { width: 100%; height: auto; aspect-ratio: 2.39; object-fit: cover; transform: scale(1.05); }
.scope .tc, .scope .ar { position: absolute; font-size: .8rem; color: var(--amber); letter-spacing: .08em; }
.scope .tc { top: .9vw; left: var(--pad); font-variant-numeric: tabular-nums; }
.scope .ar { bottom: .9vw; right: var(--pad); }

/* section title cards */
.card {
  text-align: center; font-family: var(--serif); font-weight: 600; text-transform: uppercase;
  letter-spacing: .3em; margin-right: -.3em; font-size: 1.15rem; margin-bottom: 2.6rem;
}
.card::before, .card::after { content: "—"; color: var(--amber); margin: 0 .8em; letter-spacing: 0; }
section { padding: 7rem 0 0; }

/* frames: 35mm contact strips */
.reel { padding-left: var(--pad); padding-right: var(--pad); }
.strip {
  --perf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16'%3E%3Crect x='7' y='4' width='12' height='8' rx='2' fill='%230b0b0a'/%3E%3C/svg%3E");
  display: flex; gap: 10px; background: var(--film) var(--perf) repeat-x 0 0 / 26px 16px;
  padding: 22px 12px; margin-bottom: 14px; position: relative;
}
.strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: var(--perf) repeat-x 0 0 / 26px 16px; }
.fr { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; cursor: zoom-in; }
.fr .pic { display: block; overflow: hidden; }
.fr img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transform: scale(1.07); transition: filter .3s; }
.fr:hover img { filter: brightness(1.12); }
.edge { font-size: .7rem; color: var(--amber); letter-spacing: .1em; display: flex; gap: .6em; justify-content: space-between; }
.edge i { font-style: normal; opacity: .7; }

/* credits: centred, dot leaders */
.credits { max-width: 40rem; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.songs { text-align: center; display: grid; gap: 1.4rem; }
.songs a { display: block; font-family: var(--serif); font-size: 1.7rem; font-style: italic; line-height: 1.15; }
.songs span { color: var(--dim); font-size: .9rem; }
.lead div { display: flex; align-items: baseline; gap: .6em; padding: .2rem 0; }
.lead div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted #4a4740; transform: translateY(-.3em); }
.lead dt { order: 0; color: var(--dim); }
.lead dd { order: 2; text-align: right; }
.lead dd a + a, .lead dd a + button { margin-left: .6em; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; text-align: center; }
.pair h3 { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--amber); margin-bottom: .6rem; }

/* programme: a repertory listing */
.screen { padding-left: var(--pad); padding-right: var(--pad); }
.prog { max-width: 70rem; margin: 0 auto; }
.show {
  display: grid; grid-template-columns: 5.5rem 9.5rem 1fr auto; align-items: center; gap: 1.4rem;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.prog li:last-child .show { border-bottom: 1px solid var(--line); }
.show .yr { color: var(--amber); font-variant-numeric: tabular-nums; }
.show img, .still-x { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--film); }
.show img { filter: grayscale(.35) contrast(1.05); transition: filter .3s; }
.show:hover img { filter: none; }
.show .ti { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; }
.show .by { display: block; font-family: var(--type); font-size: .85rem; color: var(--dim); margin-top: .3rem; }
.show .len { color: var(--dim); font-size: .85rem; white-space: nowrap; }
.show:hover .ti { color: var(--amber); }
.also { max-width: 70rem; margin: 1.6rem auto 0; color: var(--dim); }
.also a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* end card */
.end { text-align: center; padding: 7rem var(--pad) 3rem; display: grid; gap: .5rem; }
.fin { font-family: var(--serif); font-style: italic; font-size: clamp(2.6rem, 7vw, 6rem); line-height: 1; margin-bottom: 2rem; }

/* frame viewer */
.lb { border: 0; padding: 0; background: transparent; color: var(--ink); width: 100vw; height: 100dvh; max-width: none; max-height: none; }
.lb::backdrop { background: #000; }
.lb[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.lb img { max-width: 94vw; max-height: 84dvh; width: auto; height: auto; }
.lb-bar { display: flex; gap: 22px; align-items: center; color: var(--dim); font-size: .85rem; }
.lb-bar button { min-width: 44px; min-height: 44px; color: var(--ink); }
.lb-bar button:hover { color: var(--amber); }
#lb-count { font-variant-numeric: tabular-nums; color: var(--amber); }

@media (max-width: 760px) {
  .bar { flex-direction: column; gap: .6rem; }
  .bar nav { gap: .9rem; font-size: .75rem; }
  .strip { flex-wrap: wrap; }
  .fr { flex: 1 1 40%; }
  .show { grid-template-columns: 1fr auto; gap: .5rem 1rem; }
  .show img, .show .still-x { grid-column: 1 / -1; grid-row: 1; }
  .show .ti { grid-column: 1 / -1; }
  .show .yr { grid-row: 2; }
  .show .len { grid-row: 2; justify-self: end; }
  .pair { grid-template-columns: 1fr; }
  .songs a { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
}
