:root {
  --cream: #f4ead8;
  --paper: #fbf4e6;
  --ink: #2b1a12;
  --rust: #b5451b;
  --rust-dark: #8a3213;
  --mustard: #e0a527;
  --teal: #1f6f6b;
  --line: #d9c6a3;
  --shadow: 0 2px 0 rgba(43, 26, 18, 0.15);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-weight: 500;
}

body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(43,26,18,0.06) 1px, transparent 0);
  background-size: 18px 18px;
}

h1, h2, h3, .brand-name {
  font-family: 'Baloo 2', system-ui, sans-serif;
}

a { color: var(--rust-dark); }
a:hover { color: var(--rust); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero (header + player, combined) — fills the initial viewport, saloon.wtf-style */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding: 32px 0;
  border-bottom: 4px solid var(--rust-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #d9822b;
  background-image: url(../assets/hero-bg.jpg);
  background-size: cover;
  background-position: 38% 38%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(43,26,18,0.16) 0%, rgba(43,26,18,0.04) 30%, rgba(43,26,18,0.12) 70%, rgba(43,26,18,0.32) 100%);
}

.hero-external-link {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 3;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.25);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-external-link:hover { background: rgba(0,0,0,0.45); color: var(--mustard); }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.brand-mark { font-size: 2.1rem; }

.brand-name {
  margin: 4px 0 0;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--paper);
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.brand-dot { color: var(--mustard); }

.tagline {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--paper);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  background: rgba(20,14,10,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Compact glass radio player, saloon.wtf-style: wide, short, centered */
.radio-player {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  background: rgba(20,14,10,0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 44px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  padding: 10px 12px 10px 10px;
  color: var(--paper);
  text-align: left;
}

.radio-art {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.radio-art-fallback { font-size: 1.4rem; }

.radio-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-body { min-width: 0; flex-grow: 1; }

.radio-track {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-artist {
  margin: 1px 0 0;
  font-size: 0.72rem;
  color: rgba(251,244,230,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-progress {
  margin-top: 6px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  overflow: hidden;
}

.radio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--mustard);
  border-radius: 999px;
  transition: width 0.4s linear;
}

.radio-time {
  margin: 4px 0 0;
  font-size: 0.68rem;
  color: rgba(251,244,230,0.65);
  font-variant-numeric: tabular-nums;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.radio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
  padding: 0;
  opacity: 0.85;
}

.radio-btn:hover { opacity: 1; }
.radio-btn:active { transform: scale(0.92); }

.radio-btn-small {
  width: 30px;
  height: 30px;
}

.radio-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--rust-dark);
  opacity: 1;
}

.radio-btn-play:hover { background: #fff; }
.radio-btn-play .icon-pause { display: none; }
#play-toggle.is-playing .icon-play { display: none; }
#play-toggle.is-playing .icon-pause { display: block; }

.player-embed-hidden {
  position: fixed;
  top: -2000px;
  left: -2000px;
  width: 300px;
  height: 200px;
  opacity: 0;
  pointer-events: none;
}

.scroll-cta {
  position: absolute;
  bottom: 64px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--paper);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 999px;
  animation: scroll-cta-bob 2s ease-in-out infinite;
}

.scroll-cta:hover { background: rgba(0,0,0,0.45); color: var(--mustard); }

@keyframes scroll-cta-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Featured */
.featured {
  padding: 32px 0 12px;
}

.featured h2,
.catalogue h2 {
  font-size: 1.6rem;
  margin: 0 0 14px;
  color: var(--rust-dark);
}

.h2-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.6;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.f-card {
  background: linear-gradient(160deg, var(--mustard), #d69420);
  border: 2px solid var(--rust-dark);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.12s ease;
}

.f-card:hover { transform: translateY(-3px); }

.f-card .star { font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.7; }
.f-card h3 { margin: 4px 0 6px; font-size: 1.25rem; }
.f-card p { margin: 0; font-size: 0.95rem; line-height: 1.35; }

/* Controls */
.catalogue { padding: 20px 0 60px; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 0 10px;
  border-top: 2px dashed var(--line);
}

#search {
  flex: 1 1 240px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

#search:focus {
  outline: none;
  border-color: var(--rust);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.chip:hover { border-color: var(--rust); }

.chip.active {
  background: var(--rust);
  border-color: var(--rust-dark);
  color: var(--paper);
}

.count {
  font-size: 0.9rem;
  opacity: 0.65;
  margin: 8px 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--rust);
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.card p.card-tagline {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.85;
  flex-grow: 1;
}

.card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(31, 111, 107, 0.12);
  color: var(--teal);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.visit-arrow {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rust-dark);
  flex-shrink: 0;
}

.credit {
  font-size: 0.78rem;
  opacity: 0.6;
}

.empty {
  text-align: center;
  padding: 40px 0;
  font-size: 1.05rem;
  opacity: 0.6;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(251, 244, 230, 0.8);
  padding: 22px 0 30px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer a { color: var(--mustard); }
.site-footer a:hover { color: var(--paper); }

.footer-links { margin-top: 6px; }

.footer-credit {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(251, 244, 230, 0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(251, 244, 230, 0.6);
}

@media (max-width: 560px) {
  .brand-name { font-size: 1.6rem; }
}

@media (max-width: 640px) {
  .hero-bg {
    background-position: 32% 32%;
  }

  .scroll-cta {
    bottom: 22px;
  }

  .scroll-cta span {
    display: none;
  }
}
