/* ============================================================
   DISCO DESIGN SYSTEM — Colors & Type
   Sourced from AClub/Theme/DiscoTheme.swift (verified ground truth)
   ============================================================ */

/* ---------- Webfonts ---------- */

@font-face {
  font-family: "Archivo Black";
  src: url("fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter_18pt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter_18pt-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* — Backgrounds (cool violet near-black) — */
  --bg:            #09090F;   /* root screen background */
  --surface:       #1C1A2E;   /* cards, modals, raised surfaces */
  --surface-light: #2E2742;   /* segmented-control selected pill, hairlines */
  --tab-bg:        #1C1730;   /* bottom tab bar */
  --tab-border:    #2E2742;   /* tab bar top hairline */

  /* — Text — */
  --fg-primary:    #F0EFE8;   /* warm off-white, all primary text */
  --fg-secondary:  #9E9EB8;   /* cool gray-purple, subtitles — bumped for AA */
  --fg-tertiary:   rgba(240,239,232,0.62); /* meta, captions — AA on --bg */
  --fg-muted:      rgba(240,239,232,0.45); /* decorative-only, never body text */

  /* — Neon accents (Disco's own palette) — */
  --neon-pink:     #FF2D78;   /* primary CTA, accent, FEATURED */
  --neon-violet:   #9E2EFF;   /* active tab, Albums stat */
  --neon-blue:     #00C2FF;   /* Songs stat, info */
  --neon-green:    #39FF14;   /* ACTIVE, Now Vibing, success */
  --neon-yellow:   #FFC714;   /* ratings 5–7, warning */
  --neon-orange:   #FF8019;   /* energy, warmth, score=4 */
  --score-cyan:    #00D6FF;   /* score badges 8–10 */
  --destructive:   #FF4747;   /* score 1–3, errors */

  /* Now Vibing card */
  --vibing-bg:     #0D1F14;
  --vibing-border: rgba(57,255,20,0.25);

  /* Third-party brand */
  --spotify-green: #1DB954;

  /* — Semantic — */
  --accent:    var(--neon-pink);
  --success:   var(--neon-green);
  --warning:   var(--neon-yellow);

  /* — Type families — */
  --font-display: "Archivo Black", "Inter Tight", system-ui, sans-serif;
  --font-ui:      "Inter Tight", system-ui, sans-serif;
  --font-body:    "Inter", "Inter Tight", system-ui, sans-serif;

  /* — Spacing scale (pt) — */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-xxl: 32px;
  --sp-xxxl:48px;

  /* — Radii — */
  --r-sm:   6px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-full:999px;

  /* — Tracking — */
  --track-cap-tight:  1px;
  --track-cap:        2px;
  --track-cap-wide: 0.1em;

  /* — Shadows / glow (dialed back: glow reserved for primary CTA + score reveal) — */
  --glow-pink:   0 0 4px rgba(255,45,120,0.35);
  --glow-green:  0 0 4px rgba(57,255,20,0.35);
  --glow-violet: 0 0 4px rgba(158,46,255,0.35);
  --glow-blue:   0 0 4px rgba(0,194,255,0.35);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.18);
}

/* ---------- Base ---------- */

html, body {
  background: var(--bg);
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Semantic type ---------- */

/* Hero / display — Archivo Black */
.disco-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--fg-primary);
}
.disco-display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--fg-primary);
}
.disco-stat {                   /* big stat numbers (Albums / Songs counts) */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.disco-score-display {          /* huge score reveal */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -1px;
}

/* UI chrome — Inter Tight */
.disco-h1 { font-family: var(--font-ui); font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--fg-primary); }
.disco-h2 { font-family: var(--font-ui); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--fg-primary); }
.disco-name { font-family: var(--font-ui); font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--fg-primary); }   /* club / album names */
.disco-pill { font-family: var(--font-ui); font-weight: 500; font-size: 12px; line-height: 1; }                                 /* genre pills, tab labels */
.disco-pill-bold { font-family: var(--font-ui); font-weight: 700; font-size: 12px; line-height: 1; }                            /* section labels, badges */
.disco-micro { font-family: var(--font-ui); font-weight: 500; font-size: 10px; line-height: 1; letter-spacing: var(--track-cap-tight); }

/* Body — Inter */
.disco-body  { font-family: var(--font-body); font-weight: 400; font-size: 15px; line-height: 1.45; color: var(--fg-primary); }
.disco-body-sm { font-family: var(--font-body); font-weight: 400; font-size: 13px; line-height: 1.5; color: var(--fg-secondary); }
.disco-meta  { font-family: var(--font-body); font-weight: 400; font-size: 12px; line-height: 1.4; color: var(--fg-tertiary); } /* artist, member count */
.disco-score-badge { font-family: var(--font-body); font-weight: 800; font-size: 11px; line-height: 1; color: #fff; }           /* score badge numbers */

/* Section accent label */
.disco-section-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: var(--track-cap);
  text-transform: uppercase;
}

/* Native semantic mappings */
h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; letter-spacing: -0.5px; color: var(--fg-primary); margin: 0; }
h2 { font-family: var(--font-ui); font-weight: 700; font-size: 20px; color: var(--fg-primary); margin: 0; }
h3 { font-family: var(--font-ui); font-weight: 600; font-size: 16px; color: var(--fg-primary); margin: 0; }
p  { font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--fg-primary); margin: 0; }
small { font-family: var(--font-body); font-size: 12px; color: var(--fg-tertiary); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: var(--surface); padding: 1px 5px; border-radius: 4px; color: var(--neon-pink); }

/* ---------- Reusable component primitives ---------- */

.disco-surface-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
}
.disco-section-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.disco-section-header::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 4px currentColor;
}

/* Score color helpers */
.score-1, .score-2, .score-3 { background: var(--destructive); }
.score-4                     { background: var(--neon-orange); }
.score-5, .score-6, .score-7 { background: var(--neon-yellow); }
.score-8, .score-9, .score-10{ background: var(--score-cyan); }
