/*
  Music page. Separate from site.css on purpose: Scandinavian minimalism.
  Cool daylight white, one grotesque (Schibsted Grotesk, Oslo), and no
  decoration. Colour comes only from the work: stills and screenshots.
*/

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* The site's brand mark, shared with the main pages */
@font-face {
  font-family: "Nexa Bold";
  src: url("../fonts/nexa-bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@view-transition {
  navigation: auto;
}

:root {
  --snow: #f5f6f4;
  --frost: #e8eae7;
  --slate: #1c2125;
  --stone: #646b70;
  --line: #d8dbd7;

  --font: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --space: clamp(88px, 10vw, 152px);

  color-scheme: light;
  background: var(--snow);
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--slate);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

img,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

::selection {
  background: var(--slate);
  color: var(--snow);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--slate);
  color: var(--snow);
  translate: 0 -200%;

  &:focus-visible {
    translate: 0 0;
  }
}

/* Page and header */

.page {
  max-width: 1232px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 64px);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding-block: 28px;
  font-size: 16px;

  & a {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  & nav {
    display: flex;
    gap: 20px;
  }

  & [aria-current="page"] {
    text-decoration: underline;
  }

  & .brand:hover {
    text-decoration: none;
  }
}

/* Same brand block as the main site header */
.brand {
  display: block;
  line-height: 1.43;
}

.brand-name {
  display: block;
  padding-top: 3px;
  font-family: "Nexa Bold", Verdana, sans-serif;
  font-size: 11.2px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 16.8px;
}

.icon {
  display: inline-block;
  width: auto;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

/* Sections: a narrow index column, then the work */

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 32px;
  margin-top: var(--space);

  @media (min-width: 900px) {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  }
}

.label {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--stone);
}

.intro {
  margin-top: clamp(48px, 8vw, 120px);
  align-items: baseline;
}

.statement {
  max-width: 22em;
  font-size: clamp(28px, 2.4vw + 12px, 44px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.context {
  font-size: 16px;
  color: var(--stone);
}

.more {
  margin-top: 40px;
  font-size: 16px;
}

/* Scores: large stills that play in place */

.scores {
  display: grid;
  gap: 64px 32px;
  margin: 0;
  padding: 0;
  list-style: none;

  @media (min-width: 640px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.still {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--frost);

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &:focus-visible {
    outline-offset: 4px;
  }
}

.play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(245 246 244 / 0.9);
  transition: background-color 0.2s;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 12px;
    height: 14px;
    margin: auto;
    translate: 2px 0;
    background: var(--slate);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
  }

  .still:hover & {
    background: #fff;
  }
}

.player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.work-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 4px;
  font-weight: 500;

  & time {
    font-weight: 400;
    color: var(--stone);
  }
}

/* Voice: a plain listing; each row opens its recording */

.recordings {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);

  & li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.5rem;
    gap: 4px 24px;
    align-items: baseline;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
  }

  & a {
    font-weight: 500;
    text-decoration: none;

    /* The whole row opens the recording */
    &::after {
      content: "";
      position: absolute;
      inset: 0;
    }

    &:focus-visible {
      outline: none;
    }
  }

  & li:has(a:hover) a,
  & a[aria-expanded="true"] {
    text-decoration: underline;
  }

  & li:has(a:focus-visible) {
    outline: 2px solid var(--slate);
    outline-offset: 2px;
  }

  & time {
    color: var(--stone);
    text-align: right;
  }

  @media (max-width: 639px) {
    & li {
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas:
        "title length"
        "context context";
    }

    & a { grid-area: title; }
    & .context { grid-area: context; }
    & time { grid-area: length; }
  }
}

.audio-player {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  height: 166px;
  margin-top: 14px;
  border: 0;
}

/* Air */

/* Linked from the homepage tile as music.html#air */
.air {
  scroll-margin-top: 32px;
}

.wordmark img {
  width: clamp(120px, 12vw, 168px);
}

.tagline {
  margin-top: 20px;
  font-size: 24px;
  line-height: 1.3;
}


figcaption {
  margin-top: 12px;
  font-size: 16px;
  color: var(--stone);
}

.demo {
  margin-top: 32px;

  & figcaption {
    margin-top: 16px;
  }
}

/* The video's subheading */
.air-lede {
  max-width: 36em;
  font-size: 18px;
  color: var(--slate);
}

/* Origin: a short paragraph with two historical prints */
.origin {
  display: grid;
  gap: 32px;
  align-items: start;
  margin-top: 72px;

  @media (min-width: 900px) {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px 48px;

    /* The listing print runs down the side; the talk slide sits under the text */
    & .listing {
      grid-column: 2;
      grid-row: 1 / span 2;
    }

    & .slide {
      grid-column: 1;
      grid-row: 2;
    }
  }

  & p {
    max-width: 34em;
  }
}

/* The talk and the paper, as plain references under the story */
.refs {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;

  & span {
    display: block;
    color: var(--stone);
  }
}

/* Printed and set down at an angle: clearly from the past */
.artifact {
  max-width: 320px;

  & img {
    width: 100%;
    padding: 10px;
    background: #fff;
    box-shadow:
      0 10px 24px rgb(28 33 37 / 0.14),
      0 1px 3px rgb(28 33 37 / 0.12);
    filter: grayscale(1);
    rotate: -3deg;
  }

  & figcaption {
    margin-top: 24px;
    font-size: 14px;
  }

  &.slide {
    max-width: 460px;

    & img {
      rotate: 2deg;
    }
  }
}

/* Air today, before its history */
.today {
  margin-top: 64px;

  & img {
    width: 100%;
  }

  & figcaption {
    font-size: 14px;
  }
}

.where {
  margin-top: 40px;
  font-size: 16px;
  color: var(--stone);

  & a {
    color: var(--slate);
  }
}

/* Footer */

.foot {
  margin-top: var(--space);
  padding-block: 28px 40px;
  font-size: 14px;
  color: var(--stone);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
