@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/cormorant-garamond-400.a9ff7df676353c21.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/cormorant-garamond-600.066ec1ac2852906b.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/inter-400.dd05e326cf8eac3b.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/inter-500.b0e7558f4710a1e2.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/inter-600.62553d159189834a.woff2") format("woff2");
}

:root {
  /* The video's own first frame, so the page never flashes a different colour
     underneath it while the first frames arrive. */
  --first-frame-color: #081c3a;
  --radio-navy: #032046;
  --radio-edge: #9c7a28;
  --radio-edge-soft: rgba(156, 122, 40, 0.58);
  --radio-fill: rgba(3, 32, 70, 0.78);
  --radio-text: #b28b32;
  --font-display: "Cormorant Garamond", "Times New Roman", Times, serif;
  --font-body: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background-color: var(--first-frame-color);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-video,
.bg-poster {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease, filter 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.bg-video.is-visible,
.bg-poster.is-visible {
  opacity: 1;
}

/* Whichever element is chosen fades in over the background colour rather than
   over the other one, so the two are never cross-fading against each other. */
.bg-poster {
  z-index: 0;
}

.bg-video {
  z-index: 1;
}

.radio-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.radio-receiver {
  --radio-progress: 0;
  --radio-edge-x: 0px;
  --radio-edge-y: 0px;
  --radio-inset-x: 0px;
  --radio-inset-y: 0px;
  --radio-panel-height: 60px;
  --radio-player-width: min(22rem, 48vw);
  --radio-readout-width: min(22rem, 48vw);

  position: absolute;
  top: var(--radio-inset-y);
  left: var(--radio-inset-x);
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  color: var(--radio-text);
  background: var(--radio-fill);
  border: 1px solid var(--radio-edge-soft);
  clip-path: polygon(
    0 0,
    calc(100% - 0.9rem) 0,
    100% 0.9rem,
    100% 100%,
    0.9rem 100%,
    0 calc(100% - 0.9rem)
  );
  pointer-events: auto;
  isolation: isolate;
}

.radio-receiver::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 1px var(--radio-edge);
  z-index: 2;
}

.radio-receiver[data-player-state="buffering"]::before {
  animation: radio-edge-pulse 1.2s ease-in-out infinite;
}

.radio-receiver::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--radio-edge);
  clip-path: inherit;
  transform: translate(var(--radio-edge-x), var(--radio-edge-y));
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
}

.radio-panel {
  position: relative;
  min-height: var(--radio-panel-height);
  flex: 0 0 auto;
}

.radio-panel--player {
  width: var(--radio-player-width);
  border-right: 1px solid var(--radio-edge-soft);
}

.radio-panel--readout {
  width: var(--radio-readout-width);
}

.track-readout {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  min-height: var(--radio-panel-height);
  padding: 0.45rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 0.7rem,
    rgba(156, 122, 40, 0.035) 0.75rem
  );
}

.track-readout__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font: 500 0.67rem/1.2 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.track-readout__text {
  margin: 0;
  max-width: 100%;
  font: 600 clamp(0.72rem, 1vw, 0.88rem) / 1.3 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 1px 0 rgba(156, 122, 40, 0.35);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--radio-edge-soft) transparent;
  transition: opacity 0.2s ease;
}

.track-readout__text::-webkit-scrollbar {
  height: 3px;
}

.track-readout__text::-webkit-scrollbar-thumb {
  background: var(--radio-edge-soft);
}

.track-readout__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--radio-progress) * 100%);
  height: 1px;
  background: var(--radio-edge);
  transition: width 0.2s linear;
}

.mixcloud-frame {
  height: var(--radio-panel-height);
  overflow: hidden;
  background: var(--radio-navy);
}

.mixcloud-player {
  display: block;
  width: 100%;
  height: var(--radio-panel-height);
  border: 0;
}

.mixcloud-fallback-link {
  display: block;
  padding: 0.55rem 0.85rem 0.7rem;
  color: var(--radio-text);
  font: 600 0.72rem/1.3 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mixcloud-fallback-link[hidden] {
  display: none;
}

html[data-radio-state="playing"] .bg-video.is-visible {
  filter: brightness(0.93) contrast(1.07) saturate(0.9);
  transform: scale(1.012);
}

@keyframes radio-edge-pulse {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.7;
  }
}

@media (max-width: 44rem) {
  .radio-receiver {
    flex-direction: column;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }

  .radio-panel--player,
  .radio-panel--readout {
    width: 100%;
  }

  .radio-panel--player {
    border-right: 0;
    border-bottom: 1px solid var(--radio-edge-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video,
  .bg-poster {
    transition: none;
  }

  .radio-receiver,
  .radio-receiver::before,
  .radio-receiver::after,
  .track-readout__text,
  .track-readout__progress,
  .bg-video {
    animation: none !important;
    transition: none !important;
    transform: none;
  }

  html[data-radio-state="playing"] .bg-video.is-visible {
    filter: none;
    transform: none;
  }
}
