:root {
  color-scheme: dark;
  background: #060b12;
  color: #e2ded3;
  font-family: system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4.8vw, 6rem);
  --header: clamp(5rem, 11dvh, 7rem);
  --footer: clamp(4rem, 9dvh, 5.5rem);
  --paper: #e9e4d8;
  --muted: #b9bab1;
  --hairline: rgb(206 204 186 / 23%);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "Plex Mono", monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }

.screen {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #04080d;
}
.film-stage { position: absolute; inset: 0; background: #04080d; }

.sky {
  position: absolute;
  inset: 0;
  background: url(assets/night-sky.webp) center / cover no-repeat;
}

/* The veil sits in front of the globe and sky, with the controls above the print. */
.film-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateZ(0);
  background:
    url(assets/grain.webp) 0 0 / 192px 192px repeat,
    radial-gradient(ellipse 78% 82% at 43% 38%,
      transparent 18%, rgb(3 7 15 / 13%) 59%, rgb(2 4 10 / 77%) 100%),
    linear-gradient(115deg, rgb(85 78 71 / 4%), transparent 38%, rgb(8 12 28 / 17%) 87%),
    url(assets/emulsion.webp) center / cover no-repeat;
}

.air {
  position: absolute;
  z-index: 0;
  inset: -6px;
  opacity: .82;
  mask-image: radial-gradient(ellipse 61% 73% at 50% 47%, rgb(0 0 0 / .22) 6%, rgb(0 0 0 / .52) 48%, black 100%);
  overflow: hidden;
  pointer-events: none;
  transition: translate 750ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .air { transition: none; translate: none !important; }
}
.mist, .ash {
  position: absolute;
  inset: -5%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.mist { background-image: url(assets/mist.webp); }
.ash { background-image: url(assets/ash.webp); }
@media (orientation: portrait) {
  .mist { background-image: url(assets/mist-portrait.webp); }
  .ash { background-image: url(assets/ash-portrait.webp); }
}

.observation {
  position: absolute;
  top: 51%;
  left: 50%;
  width: min(119vw, 105vh);
  width: min(119vw, 105dvh);
  aspect-ratio: 1;
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.observation > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.observation .poster {
  inset: 12%;
  width: 76%;
  height: 76%;
}

.observation canvas, .observation video { visibility: hidden; }
.observation[data-renderer="gpu"] canvas,
.observation[data-renderer="film"] video { visibility: visible; }
.observation[data-renderer="film"] { mix-blend-mode: screen; }
.observation[data-renderer] .poster { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  body[data-page="film"] .observation[data-renderer="gpu"] { pointer-events: auto; touch-action: pan-y; cursor: grab; user-select: none; }
  body[data-page="film"] .observation[data-held] { cursor: grabbing; }
}


@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/instrument-serif.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(assets/instrument-serif-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/ibm-plex-mono.woff2) format("woff2");
}
[hidden] { display: none !important; }

.colophon {
  position: absolute;
  z-index: 3;
  inset: env(safe-area-inset-top, 0px) calc(var(--gutter) + env(safe-area-inset-right, 0px)) auto calc(var(--gutter) + env(safe-area-inset-left, 0px));
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.signature {
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: .15em;
  padding-block: .2em;
  font: 400 clamp(1.7rem, 2.15vw, 2.5rem)/1 var(--serif);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -.025em;
}
.signature i { font-weight: 400; }
.colophon nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 3rem); }
.colophon nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 .875rem/1 var(--sans);
  letter-spacing: .035em;
  text-decoration: none;
  color: #c6c8c1;
  transition: color .22s ease;
}
.colophon nav a::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: 6px;
  height: 1px; background: #c9bea8;
  transform: scaleX(0); transform-origin: left; transition: transform .24s ease;
}
.colophon nav a[aria-current="page"] { color: var(--paper); }
.colophon nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) {
  .colophon nav a:hover { color: white; }
  .colophon nav a:hover::after { transform: scaleX(1); }
}
:where(a, button, input, textarea):focus-visible { outline: 2px solid #dacaa8; outline-offset: 4px; }
.page h1:focus { outline: none; }

.controls {
  position: absolute;
  z-index: 3;
  right: calc(var(--gutter) + env(safe-area-inset-right, 0px) - 9px);
  bottom: calc(max(12px, (var(--footer) - 44px) / 2) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: .38rem;
}
.controls button {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0;
  appearance: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--paper); cursor: pointer;
  touch-action: manipulation; transition: color .2s ease;
}
#play::before {
  content: ""; position: absolute; inset: 3px; border: 1px solid rgb(221 216 197 / 48%);
  background: rgb(5 10 14 / 24%); border-radius: 50%; transition: border-color .2s ease;
}
.controls svg {
  position: relative; width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round;
}
#play svg { width: 14px; height: 14px; }
.when-playing, .when-muted, .when-ended, #play[data-ended] .when-paused, #play[data-playing] .when-paused, #sound[data-muted] .when-audible { display: none; }
#play[data-playing] .when-playing, #sound[data-muted] .when-muted { display: inline; }
#play[data-ended] .when-ended { display: inline; }
#play[data-ended] svg { width: 19px; height: 19px; }
@media (hover: hover) {
  .controls button:hover { color: #fff; }
  #play:hover::before { border-color: var(--paper); }
}
.message {
  position: absolute; z-index: 4; right: var(--gutter);
  bottom: calc(var(--footer) + env(safe-area-inset-bottom, 0px));
  max-width: min(22rem, 86vw); padding: .75rem 1rem; margin: 0;
  background: #15191b; color: var(--paper); font: .9rem/1.5 var(--sans);
}

/* Inside the sleeve, each page has its own print. */
body:not([data-page="film"])[data-page] .screen {
  background: radial-gradient(ellipse at 64% 27%, #181b1b 0%, #101415 45%, #0a0e10 100%);
}
body:not([data-page="film"])[data-page] .film-stage { display: none; }
body:not([data-page="film"])[data-page] .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url(assets/grain.webp) 0 0 / 192px 192px repeat;
  opacity: .38;
}
body:not([data-page="film"])[data-page] .colophon { border-bottom: 1px solid var(--hairline); }
.pages {
  position: absolute; z-index: 1;
  inset: calc(var(--header) + env(safe-area-inset-top, 0px)) 0 calc(var(--footer) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #515451 transparent;
}
.page {
  min-height: 100%;
  margin-inline: auto;
  padding: clamp(1.6rem, 4.8vh, 4rem) calc(var(--gutter) + env(safe-area-inset-right, 0px)) clamp(1.6rem, 4.8vh, 4rem) calc(var(--gutter) + env(safe-area-inset-left, 0px));
  width: min(100%, 102rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .84fr);
  align-items: center; gap: clamp(3rem, 9vw, 10rem);
}
.page-copy { padding-left: clamp(0rem, 3.75vw, 4.25rem); }
.page h1, .page h2 { font-family: var(--serif); font-weight: 400; }
.page h1 {
  margin: 0 0 clamp(1.75rem, 4.8vh, 3.25rem);
  font-size: clamp(4.1rem, 6.5vw, 7.8rem);
  line-height: .94; letter-spacing: -.032em; color: var(--paper);
}
.study {
  width: min(100%, 58dvh, 43rem); aspect-ratio: 5 / 6; justify-self: center;
  background-repeat: no-repeat; background-size: contain; background-position: center;
  box-shadow: inset 0 0 0 1px rgb(229 221 203 / 8%);
}
.biography { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
.biography .study {
  grid-column: 1; grid-row: 1;
  background-image: url(assets/study-biography.webp);
}
.biography .page-copy { grid-column: 2; grid-row: 1; padding: 0 clamp(0rem, 2.8vw, 3rem) 0 0; }
.biography p { margin: 0; text-wrap: pretty; }
.biography p:first-of-type {
  max-width: 24ch; font: 400 clamp(1.65rem, 2.45vw, 2.85rem)/1.16 var(--serif);
  color: #dcd9cd; letter-spacing: -.012em;
}
.biography p + p {
  max-width: 46ch; margin-top: 1.5rem; color: var(--muted);
  font: 400 clamp(.98rem, 1.12vw, 1.12rem)/1.7 var(--sans);
}
.works .study { background-image: url(assets/study-works.webp); }
.closing-world { display: none; }
body[data-closing-print] .works .study {
  position: relative;
  background: transparent;
  box-shadow: none;
  animation: none;
}
body[data-closing-print] .works .study::before {
  content: ""; position: absolute; inset: 0;
  background: #070d13 url(assets/night-sky.webp) 62% 50% / cover;
  box-shadow: inset 0 0 0 1px rgb(229 221 203 / 8%);
}
body[data-closing-print] .closing-world {
  display: block;
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 112%; height: auto; aspect-ratio: 1;
  pointer-events: none;
}
body[data-closing-print] .works .page-copy { animation: none; }
body[data-arriving][data-page="works"] .film-stage {
  display: block; pointer-events: none; animation: lights-down 1500ms ease-in-out both;
}
body[data-arriving] .observation { opacity: 0; }
body[data-arriving] .works .study::before { animation: mount-print 1500ms ease-in-out both; }
@keyframes lights-down { from { opacity: 1; } to { opacity: 0; } }
@keyframes mount-print { from { opacity: 0; } to { opacity: 1; } }
.catalogue { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--hairline); }
.catalogue li { border-top: 1px solid var(--hairline); }
.catalogue summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto .8rem; align-items: baseline;
  column-gap: .85rem; list-style: none; cursor: pointer;
  padding: clamp(.85rem, 1.8vh, 1.4rem) 0;
}
.catalogue summary::-webkit-details-marker { display: none; }
.catalogue summary::after {
  content: ""; grid-area: 1 / 3; align-self: center; width: .65rem; height: .65rem;
  background: linear-gradient(var(--muted),var(--muted)) center / 100% 1px no-repeat,
              linear-gradient(var(--muted),var(--muted)) center / 1px 100% no-repeat;
}
.catalogue details[open] summary::after { background-size: 100% 1px, 0 0; }
.catalogue summary:focus-visible { outline: 2px solid #dacaa8; outline-offset: 3px; }
.catalogue summary:hover .work-title { color: #fff4df; }
.work-title { font: 400 clamp(1.58rem, 2.15vw, 2.45rem)/1.08 var(--serif); letter-spacing: -.012em; }
.work-credit { grid-column: 1; margin: .45rem 0 0; color: var(--muted); font: .875rem/1.4 var(--sans); }
.catalogue details > p { margin: 0 0 1.15rem; max-width: 49ch; color: #d0cec3; font: 1rem/1.58 var(--sans); }
.catalogue time { grid-column: 2; grid-row: 1; color: #b6b5a9; font: .72rem/1 var(--mono); letter-spacing: .045em; }
.spotify {
  display: inline-flex; align-items: center; gap: .9rem; margin-top: .95rem; min-height: 44px;
  text-decoration: none; color: #e4d8c0; font: .9rem/1.2 var(--sans);
}
.spotify:hover, .spotify:focus-visible { text-decoration: underline; text-underline-offset: .3em; }
.contact .study { background-image: url(assets/study-contact.webp); }
@media (prefers-reduced-motion: no-preference) {
  .page:not([hidden]) .study { animation: print-in .48s ease-out both; }
  .page:not([hidden]) .page-copy { animation: type-in .32s ease-out both; }
}
@keyframes print-in { from { opacity: .25; } to { opacity: 1; } }
@keyframes type-in { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.correspondent { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 2.2vw, 2.5rem); }
#enquiry label { display: block; min-width: 0; font: .875rem/1.45 var(--sans); color: #c1c2b8; }
#enquiry input, #enquiry textarea {
  display: block; width: 100%; margin: .15rem 0 1.85rem; padding: .52rem 0;
  appearance: none; border: 0; border-bottom: 1px solid #67706c; border-radius: 0;
  background: transparent; color: var(--paper); caret-color: #e3d2b4;
  font: 1rem/1.55 var(--sans); transition: border-color .22s ease;
}
#enquiry :is(input, textarea):focus { outline: none; border-color: #e1d3b8; box-shadow: 0 1px 0 #e1d3b8; }
#enquiry textarea { min-height: 5.6rem; resize: vertical; }
.send {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 1.8rem; min-height: 44px; padding: .7rem 1.1rem;
  background: #ded8c8; border: 1px solid transparent; color: #171a19; border-radius: 0;
  font: .87rem/1.3 var(--sans); cursor: pointer;
}
.send:hover { background: #eee7d7; }
.send:disabled { opacity: .65; cursor: wait; }
#enquiry .enquiry-status { margin: .8rem 0 0; color: var(--paper); font: .9rem/1.5 var(--sans); }

@media (max-width: 740px) {
  :root { --header: 4.75rem; --footer: 4.25rem; }
  .signature { font-size: clamp(1.48rem, 5.5vw, 1.85rem); }
  .colophon { gap: .7rem; }
  .colophon nav { gap: clamp(.75rem, 3.8vw, 1.6rem); }
  .colophon nav a { font-size: .875rem; letter-spacing: .012em; }
  .page, .biography {
    display: flex; flex-direction: column; justify-content: center; align-items: stretch;
    max-width: 42rem; gap: clamp(1.55rem, 4.3vh, 2.8rem);
    padding-block: 1.25rem 1.5rem;
  }
  .page-copy, .biography .page-copy { padding: 0; }
  .page h1 { font-size: clamp(3.7rem, 13vw, 5.1rem); margin-bottom: 1.45rem; }
  .study { flex: none; order: -1; width: 100%; aspect-ratio: 12 / 5; }
  .biography .study { background-image: url(assets/study-biography-wide.webp); }
  .works .study { background-image: url(assets/study-works-wide.webp); }
  body[data-closing-print] .closing-world { width: auto; height: 124%; }
  .contact .study { background-image: url(assets/study-contact-wide.webp); }
  .biography p:first-of-type { font-size: clamp(1.65rem, 6.5vw, 2rem); }
  .biography p + p { margin-top: 1.05rem; }
  .catalogue summary { padding: .8rem 0; }
  .work-title { font-size: 1.65rem; }
  #enquiry input, #enquiry textarea { margin-bottom: 1.2rem; }
}
@media (max-width: 350px) {
  :root { --gutter: .95rem; }
  .colophon nav { gap: .65rem; }
  .colophon nav a { font-size: .8125rem; }
  .correspondent { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .colophon nav a, .colophon nav a::after, .controls button, #play::before, #enquiry :is(input, textarea) { transition: none; }
}

/* Programme notes open inside the sleeve. Each recording supplies its own image. */
.works { align-items: start; }
.works .study { position: sticky; top: 1.7rem; align-self: start; }
.works .selected-print { aspect-ratio: 16/9; background: #080a0b; box-shadow: none; }
.works .selected-print::before, body[data-closing-print] .selected-print .closing-world { display: none; }
#work-art { display: block; width: 100%; height: auto; }
.work-filter { display: flex; flex-wrap: wrap; gap: .35rem 1.05rem; margin: -.55rem 0 1rem; }
.work-filter button, .work-actions a, .record-links a, .record-versions a, #close-record {
  min-height: 42px; display: inline-flex; align-items: center; background: transparent; color: var(--muted);
  border: 0; padding: .35rem 0; font: .9rem/1.4 var(--sans); text-decoration: none;
}
.work-filter button, #close-record { cursor: pointer; }
.work-filter [aria-pressed="true"], .record-versions [aria-current], .work-actions a:hover, .record-links a:hover, #close-record:hover {
  color: var(--paper); text-decoration: underline; text-underline-offset: .38em;
}
.work-length { grid-area: 1 / 2; font: .78rem/1.4 var(--mono); color: var(--muted); }
.catalogue .work-year { font: inherit; color: inherit; }
.work-actions, .record-versions { display: flex; gap: .35rem 1.3rem; flex-wrap: wrap; margin: -.4rem 0 .85rem; }
.work-actions a:first-child { color: var(--paper); }.work-actions .triangle { margin-right: .55rem; width: 0; height: 0;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 7px solid #d6c5a4; }
.work-actions a { text-decoration: underline; text-underline-offset: .32em; }
.paired-readings { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.paired-readings a { color: var(--paper); text-decoration: none; }.paired-readings img { display: block; width: 100%; }
.paired-readings span { display: block; margin-top: .5rem; font: .94rem/1.5 var(--sans); }.paired-readings small { color: var(--muted); font: .78rem var(--mono); margin-left: .3rem; }
.catalogue p a,.biography p a { color: inherit; text-decoration-color: #7f8076; text-underline-offset: .2em; }
.form-intro,.work-context { color: var(--muted); font: 1rem/1.55 var(--sans); margin: 0 0 1.2rem; }
.work-context { color: var(--paper); border-left: 1px solid #bbb09e; padding-left: .8rem; }
#record-player { color: var(--paper); background: #080b0e; border: 0; width: min(74rem,98vw,calc((100dvh - 9.5rem) * 1.7778)); min-width: min(19rem,96vw); max-height: 98dvh; padding: .5rem 1rem; overflow: auto; }
#record-player::backdrop { background: #030609f7; }
.record-dialog-head,.record-links { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.record-dialog-head { padding-bottom: .7rem; }.record-dialog-head .small-type { margin: 0 0 .2rem; color: var(--muted); font: .76rem/1.3 var(--mono); }
.record-dialog-head h2 { margin: 0; font: 400 clamp(1.65rem,3.1vw,3rem)/1.07 var(--serif); }
#record-video { aspect-ratio: 16/9; background: #030506; }#record-video iframe { width: 100%; height: 100%; display: block; border: 0; }
.record-versions { margin: .5rem 0 0; }.record-links { padding-top: .3rem; }
@media(max-width:740px) {
  .works .study { position: static; align-self: stretch; }
  .work-filter { gap: .25rem .85rem; }.work-actions { gap: .2rem .9rem; }
  #record-player { padding: .5rem; }.paired-readings small { display: block; margin-left: 0; }
}
.film-strip { margin: .55rem 0 1.1rem; }
.film-strip figcaption { margin-bottom: .55rem; font: .87rem/1.4 var(--sans); color: var(--muted); }
.film-strip > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #070b10; }
.film-strip a { display: block; min-width: 0; color: var(--muted); text-decoration: none; text-align: center; }
.film-strip img { width: 100%; height: auto; display: block; }
.film-strip time { display: block; padding: .3rem 0 .5rem; font: .76rem/1.2 var(--mono); }
.film-strip a:hover, .film-strip a:focus-visible { color: var(--paper); box-shadow: inset 0 -1px var(--paper); }
