@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-var-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Change --accent to recolour the site. Everything else derives
     from it. The logo SVG and the Bandcamp player's linkcol are not
     CSS and have to be updated separately. */
  --accent: #22CAEA;
  --bg: #0F0F0F;
  --rule: #2A2A2A;
  --text-muted: #949494;

  --link: color-mix(in srgb, var(--accent), white 20%);
  --link-visited: color-mix(in srgb, var(--accent), black 30%);
  --accent-dim: color-mix(in srgb, var(--accent), black 35%);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  color: #DDD;
  font-size: 18px;
  hyphens: auto;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #FFF;
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, 'Palatino Linotype',
               Palatino, 'Book Antiqua', 'Times New Roman', Times, serif;
  font-weight: 700;
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 120;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

summary {
  cursor: pointer;
}

summary h1, summary h2, summary h3, summary h4, summary h5, summary h6 {
  display: inline;
}

body > header {
  text-align: center;
  position: relative;
}

body > header > h1 {
  text-indent: -9999px;
  margin: 0;
}

/* The tagline. :first-of-type keeps this off #next-show. */
body > header > p:first-of-type {
  margin: 0.75em 0 0;
  padding: 0 5vw;
  color: var(--text-muted);
  font-size: clamp(0.8rem, 0.7rem + 0.5vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

body > header > ul {
  list-style-type: none;
  padding-inline-start: 0;
  text-align: center;
  margin-top: 2em;
}

body > header > ul > li {
  display: inline;
  padding: calc(0.5em + 1vw);
}

/* :visited is listed too, since it would otherwise outrank this rule
   and tint the icons, which draw themselves in currentColor. */
body > header > ul > li a,
body > header > ul > li a:visited {
  display: inline-block;
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

body > header > ul > li a:hover,
body > header > ul > li a:focus-visible {
  color: #FFF;
  transform: scale(1.2);
}

/* Delete the whole <p id="next-show"> when there is no show booked,
   rather than leaving an empty box. */
body > header > p#next-show {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.2em 0.7em;
  margin: 1.5em 5vw 0;
  padding: 0.6em 1.1em;
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  font-size: 0.85rem;
}

body > header > p#next-show > span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body > header > figure {
  position: relative;
  width: 1080px;
  height: 720px;
  max-width: 100%;
  max-height: 66vw;
  margin: 0 auto;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg), transparent 10%, transparent 66%, var(--bg)),
        linear-gradient(to right, var(--bg), transparent 15%, transparent 85%, var(--bg));
}
body > header > figure img {
  /* height: 66vw; */
  /* max-height: 300px; */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
  opacity: 0;
  mix-blend-mode: hue;

  /* mask-image: linear-gradient(to bottom, transparent, black 20%, black 10%, transparent),
              linear-gradient(to right, transparent, black 15%, black 85%, transparent); */

  /* mask-composite: intersect; */
  animation-name: fade-zoom;
  animation-iteration-count: infinite;
  animation-duration: 80s;
  animation-timing-function: linear;
}

@keyframes fade-zoom {
  0% {opacity: 0;}
  2% {opacity: 1; transform: scale(1.01);}
  25% {opacity: 1; transform: scale(1.1);}
  27% {opacity: 0; transform: scale(1.11);}
  75% {opacity: 0; transform: scale(1);}
  100% {opacity: 0;}
}

body > header > figure img:nth-child(1) {
  animation-delay: 0s;
}
body > header > figure img:nth-child(2) {
  animation-delay: 20s;
}
body > header > figure img:nth-child(3) {
  animation-delay: 40s;
}
body > header > figure img:nth-child(4) {
  animation-delay: 60s;
}

/* The logo */
body > header > img {
  margin-top: -400px;
  margin-left: 8px;
  margin-right: 8px;
  max-width: calc(100% - 16px);
  filter: drop-shadow(0 0 5px black);
}

/* Backstage has no photo montage for the logo to overlap, and its h1 is
   a real heading rather than the wordmark the logo already spells out. */
body#backstage > header > img {
  margin-top: 0;
}

body#backstage > header > h1 {
  text-indent: 0;
  margin: 0.3em 0 0;
}

body > header > nav {
  margin-top: 2em;
  border-block: 1px solid var(--rule);
}

body > header > nav > ol {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 clamp(0.25em, 2vw, 1.5em);
  margin: 0;
  padding: 0 5vw;
  list-style: none;
  hyphens: none;
}

/* :visited is listed too: it outranks a plain descendant selector, and
   these are same-page anchors, so one click would otherwise leave an
   item stuck in the visited-link colour. */
body > header > nav a,
body > header > nav a:visited {
  display: block;
  padding: 0.85em 0.6em;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

body > header > nav a:hover,
body > header > nav a:focus-visible {
  color: #DDD;
  border-bottom-color: var(--accent);
}

body > footer {
  margin-top: 5em;
  padding: 2.5em 5vw;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

body > footer p {
  margin: 0.3em 0;
}

body > main {
  max-width: 40rem;
  margin: auto;
  padding: 0 5vw;
}

body > main > section {
  margin-top: 4em;
}

section > h2 {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0 0 0.6em;
  font-size: clamp(1.8rem, 1.2rem + 3vw, 3rem);
  text-transform: uppercase;
}

section > h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent-dim), transparent);
}

h3 {
  color: var(--accent);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
}

section figure {
  /* text-align: center; */
  margin-left: 0;
  margin-right: 0;
}

main figure img, main figure video {
  display: block;
  box-sizing: border-box;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

figure audio {
  width: 100%;
}

figcaption {
  margin-top: 0.7em;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

section#music ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style-type: none;
  padding: 0;
}

section#music ul li a {
  display: block;
  padding: 0.45em 0.9em;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 0.85rem;
  color: #DDD;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

section#music ul li a:hover,
section#music ul li a:focus-visible {
  color: var(--bg);
  background-color: var(--accent);
  border-color: var(--accent);
}

section#music iframe {
  border: 0;
  width: 100%;
  height: min(calc(100vw * 1.7), 971px);
  border-radius: 4px;
}

section#live ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

section#live li {
  padding: 0.9em 0;
  border-bottom: 1px solid var(--rule);
}

section#live li:last-child {
  border-bottom: 0;
}

/* The date eyebrow and the disclosure label are the same treatment.
   font: inherit also undoes Fraunces on the h3 inside <summary>. */
section#live time,
section#live summary h3 {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
}

section#live time {
  display: block;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

section#live small {
  display: block;
  margin-top: 0.15em;
  color: var(--text-muted);
}

/* "Upcoming" is obvious from the accent bar and the "Past" toggle
   beneath it, so it is hidden visually but kept in the heading
   outline. display: none would drop it from the outline as well. */
section#live > h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* The upcoming list is the one that is not inside <details>. */
section#live > ol > li {
  padding-inline-start: 0.9em;
  border-inline-start: 2px solid var(--accent);
}

section#live summary {
  padding: 0.9em 0;
  color: var(--text-muted);
}

/* Safari allows only colour and font-size on ::marker and still needs
   the WebKit pseudo. These stay separate rules: an unrecognised pseudo
   inside a selector list would invalidate the whole thing. */
section#live summary::marker {
  color: var(--accent);
}

section#live summary::-webkit-details-marker {
  color: var(--accent);
}

section#live summary:hover {
  color: #DDD;
}

section#live li img {
  display: block;
  border-radius: 4px;
  margin-top: 1em;
}

section#downloads ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

section#downloads li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  padding: 0.7em 0;
  border-bottom: 1px solid var(--rule);
}

section#downloads code {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

img, iframe, video {
  max-width: 100%;
  height: auto;
}
