@font-face {
  font-family: Cardo;
  src: url("/assets/cardo-regular-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5efe5;
  --ink: #252720;
  --muted: #544e44;
  --rule: #cfc3ae;
  --panel: #212720;
  --panel-text: #f8f2e6;
  --accent: #f0ba7f;
  font-family: system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: .26em;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible {
  outline: 3px solid #9a522e;
  outline-offset: 4px;
}

.masthead, main {
  width: min(100% - 3rem, 62rem);
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid var(--rule);
  padding-block: 1.6rem 1rem;
}

.masthead span {
  font-family: Cardo, Georgia, serif;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

.masthead a, .stream-link {
  color: var(--muted);
  font-size: .92rem;
}

main { padding: clamp(2rem, 7vw, 5rem) 0 3rem; }

.station {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 32%);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  padding: 0 clamp(0rem, 2vw, 1.4rem) clamp(2rem, 5vw, 3.5rem);
}

.station h1 {
  margin: 0;
  font: 400 clamp(3.35rem, 9vw, 7.6rem)/1.01 Cardo, Georgia, serif;
  letter-spacing: -.06em;
}

.station p {
  max-width: 29rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.6;
}

.signal {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
}

.dial {
  position: absolute;
  inset: 0;
  border: 1px solid #b7a489;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 13px, #d6c8b2 14px 15px);
  opacity: .74;
}

.wave {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  width: 68%;
  height: 38%;
  background: var(--paper);
  border-radius: 50%;
}

.wave i {
  width: 2px;
  height: 30%;
  background: #89502f;
  border-radius: 2px;
}

.wave i:nth-child(2n) { height: 52%; }
.wave i:nth-child(3n) { height: 75%; }
.wave i:nth-child(6) { height: 100%; }
.wave i:first-child, .wave i:last-child { height: 20%; }

.player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem clamp(1.2rem, 4vw, 2.4rem);
  min-height: 8.2rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  color: var(--panel-text);
  background: var(--panel);
  border-radius: .35rem;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-width: 8rem;
  min-height: 3rem;
  padding: .7rem 1rem;
  color: #252118;
  background: var(--accent);
  border: 0;
  border-radius: .2rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button[hidden] { display: none; }
button:hover { background: #ffd09b; }
button:focus-visible { outline-color: #fff2d8; }

.play-icon {
  width: .68rem;
  height: .79rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

button[data-state="playing"] .play-icon,
button[data-state="loading"] .play-icon {
  clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0);
}

.track { min-width: 0; }

.track-label {
  color: #e2c7a8;
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.indicator {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .3rem;
  border-radius: 50%;
  background: #a69b8a;
}

.track-label[data-live="true"] .indicator { background: var(--accent); }

#track-title {
  margin: .3rem 0 0;
  overflow-wrap: anywhere;
  font: 400 clamp(1.32rem, 3vw, 2.1rem)/1.16 Cardo, Georgia, serif;
}

#playback-status {
  grid-column: 1 / -1;
  margin: 0;
  color: #f6d6af;
  font-size: .88rem;
}

#playback-status:empty { display: none; }

audio { display: block; max-width: 100%; }
audio[hidden] { display: none; }

.stream-link { display: inline-block; margin-top: 1.15rem; }

@media (max-width: 39rem) {
  .station { grid-template-columns: minmax(0, 1fr); position: relative; }
  .signal { display: none; }
  .station h1 { font-size: clamp(3.1rem, 12vw, 5.6rem); }
  .player { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

@media (max-width: 23rem) {
  .masthead, main { width: calc(100% - 2rem); }
  .masthead a { font-size: .83rem; }
}
