/* RadioCalico player — styled per the brand guide.
   Palette: Mint #D8F2D5 · Forest #1F4E23 · Teal #38A29D · Orange #EFA63C
            Charcoal #231F20 · Cream #F5EADA · White #FFF */

:root {
  --mint: #D8F2D5;
  --forest: #1F4E23;
  --teal: #38A29D;
  --orange: #EFA63C;
  --charcoal: #231F20;
  --cream: #F5EADA;
  --heading: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: #fff;
}

h1, h2, h3 { font-family: var(--heading); line-height: 1.2; }

/* --- Nav --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--teal);
  padding: 0.75rem 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mint);
  object-fit: contain;
}
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--mint); }

/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 4rem 1.5rem;
  color: #fff;
  background: radial-gradient(circle at 70% 20%, #2d5f4f, var(--charcoal));
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(56,162,157,0.55), rgba(31,78,35,0.15));
}
.hero-content { position: relative; max-width: 1200px; margin: 0 auto; width: 100%; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mint);
  margin: 0 0 0.75rem;
}
.hero h1 { font-size: 3rem; font-weight: 700; margin: 0 0 1rem; }
.hero-sub { font-size: 1.15rem; max-width: 34rem; margin: 0; }

/* --- Player card --- */
main { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.player-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 2rem;
  margin: -3rem auto 4rem;
  max-width: 640px;
  position: relative;
  box-shadow: 0 12px 40px rgba(35,31,32,0.18);
}

.now-playing { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.5rem; }
.cover {
  width: 120px; height: 120px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  background: var(--mint);
  box-shadow: 0 4px 16px rgba(35,31,32,0.2);
}
.np-text { min-width: 0; }
.live-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(239,166,60,0.7);
  flex: none;
}
.np-text .np-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  font-weight: 600;
}
.np-text .np-title {
  margin: 0;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--forest);
  overflow-wrap: anywhere;
}
.np-text .np-artist {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  color: var(--charcoal);
  overflow-wrap: anywhere;
}
.np-text .np-meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.7;
}
.np-text .np-meta:empty { display: none; }
/* Pulse only while playing. */
body.is-playing .live-dot { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,166,60,0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(239,166,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,166,60,0); }
}

.controls { display: flex; align-items: center; gap: 1.5rem; }

.play-btn {
  width: 64px; height: 64px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.play-btn:hover { background: var(--teal); }
.play-btn:focus-visible { outline: 3px solid rgba(56,162,157,0.45); outline-offset: 2px; }
.play-btn svg { fill: currentColor; }
.play-btn .icon-pause { display: none; }
body.is-playing .play-btn .icon-play { display: none; }
body.is-playing .play-btn .icon-pause { display: block; }

.volume { display: flex; align-items: center; gap: 0.6rem; flex: 1; color: var(--charcoal); }
.vol-icon { flex: none; color: var(--teal); }

/* Custom range: teal fill, circular thumb. */
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(35,31,32,0.18);
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.vol-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
}

.status { margin: 1.5rem 0 0; font-size: 0.9rem; color: var(--charcoal); opacity: 0.75; }
.status.error { color: #c0392b; opacity: 1; font-weight: 600; }

/* --- Recently played --- */
.recent { max-width: 640px; margin: 0 auto 4rem; }
.recent h2 { font-size: 1.5rem; font-weight: 600; color: var(--forest); margin: 0 0 1rem; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid rgba(35,31,32,0.1);
}
.recent-list li:last-child { border-bottom: 0; }
.recent-list .r-title { font-weight: 600; color: var(--charcoal); }
.recent-list .r-artist { color: var(--charcoal); opacity: 0.7; }
.recent-list .recent-empty { color: var(--charcoal); opacity: 0.6; border-bottom: 0; }

/* --- About --- */
.about { max-width: 720px; margin: 0 auto 4rem; }
.about h2 { font-size: 2.25rem; font-weight: 600; color: var(--forest); }

/* --- Footer --- */
.footer {
  background: var(--cream);
  color: var(--forest);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.1rem; }
  .player-card { padding: 1.5rem; }
}
