/* ---------------------------------------------------------
   RMP — Realtech Music Player
   Token system
--------------------------------------------------------- */
:root {
  --bg: #0a0f12;
  --bg-raised: #10171b;
  --bg-card: #131c21;
  --border: #1f2b30;
  --border-hover: #2a3d3a;

  --accent: #39ff88;
  --accent-dim: #1f8a52;
  --accent-soft: rgba(57, 255, 136, 0.12);

  --warn: #ffb454;
  --warn-soft: rgba(255, 180, 84, 0.12);

  --text: #e7f2ec;
  --text-muted: #8ea39b;
  --text-faint: #5f7570;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --max-width: 960px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

/* ---------------------------------------------------------
   Focus states
--------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  background:
    radial-gradient(ellipse 700px 420px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem 3.5rem;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Signature element: a small idle VU-meter, evoking a tracker channel display */
.hero__meter {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
  margin-bottom: 1.75rem;
}

.hero__meter span {
  width: 4px;
  background: var(--accent-dim);
  border-radius: 1px;
  animation: meter 1.8s ease-in-out infinite;
}

.hero__meter span:nth-child(1) { height: 40%; animation-delay: -1.4s; }
.hero__meter span:nth-child(2) { height: 90%; animation-delay: -0.9s; }
.hero__meter span:nth-child(3) { height: 60%; animation-delay: -1.7s; }
.hero__meter span:nth-child(4) { height: 100%; animation-delay: -0.4s; }
.hero__meter span:nth-child(5) { height: 55%; animation-delay: -1.1s; }

@keyframes meter {
  0%, 100% { opacity: 0.5; transform: scaleY(0.6); background: var(--accent-dim); }
  50% { opacity: 1; transform: scaleY(1); background: var(--accent); }
}

.hero__icon {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  border: 1px solid var(--border-hover);
  box-shadow: 0 0 0 1px var(--bg), 0 0 40px var(--accent-soft);
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0.25rem 0 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero__copy {
  margin: 0 0 2rem;
  max-width: 32rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.button {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.button--cta {
  background: var(--accent);
  color: #04140b;
}

.button--cta:hover {
  background: #5dffa2;
  box-shadow: 0 0 24px var(--accent-soft);
}

.button--cta:active {
  transform: translateY(1px);
}

/* ---------------------------------------------------------
   Playlists section
--------------------------------------------------------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.playlists__intro {
  margin-bottom: 2rem;
}

.playlists__intro h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

.playlists__intro p {
  margin: 0;
  color: var(--text-muted);
}

.playlist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.playlist-card:hover,
.playlist-card:focus-within {
  border-color: var(--border-hover);
  border-left-color: var(--accent);
  background: var(--bg-raised);
}

.playlist-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.playlist-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.playlist-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.track-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.playlist-card__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--warn);
}

.playlist-card__link {
  align-self: flex-start;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.playlist-card__link:hover {
  background: var(--accent);
  color: #04140b;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge--preview {
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid rgba(255, 180, 84, 0.35);
}

.playlist-card--preview {
  border-left-color: var(--warn);
}

.playlist-card--preview:hover,
.playlist-card--preview:focus-within {
  border-left-color: var(--warn);
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 3rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-hover);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---------------------------------------------------------
   Small screens
--------------------------------------------------------- */
@media (max-width: 420px) {
  .hero {
    padding: 3rem 1.25rem 3rem;
  }

  .playlist-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero__meter span {
    animation: none;
    opacity: 0.85;
    transform: none;
    height: 60% !important;
  }

  .button,
  .playlist-card,
  .playlist-card__link {
    transition: none;
  }
}
