/* ================================================================
   Bandspring  —  Design System
   Base: tokens, reset, typography, utilities, grid, responsive
   Components & pages loaded separately
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Instrument+Serif:ital@0;1&family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* ── Component & page styles ─────────────────────────────────── */
@import url('components/header.css');
@import url('components/footer.css');
@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/cover.css');
@import url('components/artist-card.css');
@import url('components/tags.css');
@import url('components/stars.css');
@import url('components/player-bar.css');
@import url('components/modal.css');
@import url('components/forms.css');
@import url('components/toast.css');
@import url('components/flash.css');
@import url('components/pickers.css');
@import url('pages/home.css');
@import url('pages/auth.css');
@import url('pages/dashboard.css');
@import url('responsive.css');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  --bg: #0d0a14;
  --bg-elev: #16111f;
  --bg-card: #1c1628;
  --bg-hover: #241c33;
  --ink: #f5f0ff;
  --ink-soft: #d4ccea;
  --muted: #8a82a3;
  --muted-2: #5f5878;
  --rule: rgba(245, 240, 255, 0.08);
  --rule-strong: rgba(245, 240, 255, 0.18);
  --accent: #00d9ff;
  --accent-2: #5eeaff;
  --accent-glow: rgba(94, 234, 255, 0.4);
  --accent-ink: #ffffff;
  --success: #1ed760;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Inter Tight", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
}

/* ── Light theme: Sunset Vinyl ────────────────────────────────── */
[data-theme="light"] {
  --bg: #fffaf2;
  --bg-elev: #fff1e0;
  --bg-card: #ffffff;
  --bg-hover: #fff5e8;
  --ink: #2a1b3d;
  --ink-soft: #5a4068;
  --muted: #8b7a99;
  --muted-2: #b3a5be;
  --rule: rgba(42, 27, 61, 0.08);
  --rule-strong: rgba(42, 27, 61, 0.22);
  --accent: #ff6b5b;
  --accent-2: #ffc53d;
  --accent-glow: rgba(255, 107, 91, 0.28);
  --accent-ink: #ffffff;
  --success: #2d8f5a;
}


/* ================================================================
   Reset
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ================================================================
   Body
   ================================================================ */
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 217, 255, 0.10), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(94, 234, 255, 0.05), transparent),
    var(--bg);
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   Element Resets
   ================================================================ */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

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


/* ================================================================
   Type Utilities
   ================================================================ */
.font-display { font-family: var(--font-display); }
.font-serif   { font-family: var(--font-serif); }
.font-mono    { font-family: var(--font-mono); }
.italic       { font-style: italic; }
.text-muted   { color: var(--muted); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.85rem; }
.text-lg      { font-size: 1.15rem; }
.text-xl      { font-size: 1.5rem; }


/* ================================================================
   Container
   ================================================================ */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 48px;
}


/* ================================================================
   Select (native styling)
   ================================================================ */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%238a82a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px !important;
}


/* ================================================================
   Scroll & Selection
   ================================================================ */
html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}


/* ================================================================
   Equalizer Animation
   ================================================================ */
@keyframes eq {
  0%, 100% { height: 3px; }
  50%      { height: 14px; }
}

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.eq span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.8s ease-in-out infinite;
}

.eq span:nth-child(1) { animation-delay: 0s;   }
.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s;  }
.eq span:nth-child(4) { animation-delay: 0.45s; }

.eq.paused span {
  animation-play-state: paused;
  height: 3px;
}


/* ================================================================
   Glow Ring
   ================================================================ */
.glow-ring {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}


/* ================================================================
   Hover Lift (generic)
   ================================================================ */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}


/* ================================================================
   Utility: visually-hidden (for a11y)
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ================================================================
   Grid helpers
   ================================================================ */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm       { gap: 8px; }
.gap-md       { gap: 16px; }
.gap-lg       { gap: 24px; }


/* ================================================================
   Responsive — 880px
   ================================================================ */
@media (max-width: 880px) {
  .container {
    padding: 24px 32px;
  }

  .grid-4,
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ================================================================
   Responsive — 720px
   ================================================================ */
@media (max-width: 720px) {
  .container {
    padding: 20px 16px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   Responsive — 480px
   ================================================================ */
@media (max-width: 480px) {
  .container {
    padding: 16px 12px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}


/* ================================================================
   Spacer body for fixed player bar
   ================================================================ */
body.has-player {
  padding-bottom: 96px;
}

@media (max-width: 720px) {
  body.has-player {
    padding-bottom: 80px;
  }
}
