/* ===== Tokens ===== */
:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #181818;
  --surface-3: #202020;
  --border: #2a2a2a;
  --green: #1DB954;
  --green-bright: #1ed760;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #7a7a7a;
  --radius: 10px;
  --maxw: 1120px;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--text-primary); }
h3 { font-size: 1.15rem; }

section { padding: 88px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

.eyebrow {
  color: var(--green-bright);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.lede {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 720px;
  margin-top: 16px;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { max-width: none; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nav-brand img { height: 22px; width: auto; }
.nav-brand span { font-weight: 700; color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.nav-links { display: flex; gap: clamp(12px, 1.8vw, 22px); flex-wrap: nowrap; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 1180px) {
  .nav-brand span { display: none; }
}

@media (max-width: 980px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 24px; border-top: 1px solid var(--border); white-space: normal; }
  .nav-toggle { display: block; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(29,185,84,0.28), transparent 60%),
    var(--bg);
  border-top: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-logo { height: 30px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; }
.hero h1 .accent { color: var(--green-bright); }
.hero .lede { font-size: 1.15rem; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.badge {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
}
.badge.green { border-color: rgba(29,185,84,0.4); color: var(--green-bright); background: rgba(29,185,84,0.08); }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art img { border-radius: 16px; box-shadow: var(--shadow); max-width: min(400px, 100%); }
body { overflow-x: hidden; }

.cta-row { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--green); color: #06170c; }
.btn-primary:hover { background: var(--green-bright); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--text-secondary); text-decoration: none; }

/* ===== Track strip ===== */
.track-strip {
  display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 18px;
  scrollbar-width: thin;
}
.track-card {
  flex: 0 0 148px; width: 148px; min-width: 0; max-width: 148px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; transition: transform .15s ease, border-color .15s ease;
  box-sizing: border-box;
}
.track-card:hover { transform: translateY(-3px); border-color: rgba(29,185,84,0.4); }
.track-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 10px; display: block; }
.track-card .t-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.track-card .t-artist { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: 2px; }
.tag { display: inline-block; margin-top: 8px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; }
.tag.feat { background: rgba(29,185,84,0.15); color: var(--green-bright); }
.tag.solo { background: var(--surface-3); color: var(--text-muted); }

/* ===== Stat grid ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 28px; }
.stat-tile {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px;
}
.stat-tile .v { font-size: 2rem; font-weight: 800; color: var(--green-bright); line-height: 1; }
.stat-tile .v.neutral { color: var(--text-primary); }
.stat-tile .l { color: var(--text-secondary); font-size: 0.85rem; margin-top: 8px; }
.stat-tile .sub { color: var(--text-muted); font-size: 0.75rem; margin-top: 4px; }

/* ===== Cards / content blocks ===== */
.card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.figure { margin-top: 28px; }
.figure img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: #fff;
}
.figure figcaption { color: var(--text-muted); font-size: 0.85rem; margin-top: 10px; }

/* ===== Interactive charts ===== */
.chart-panel {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-sizing: border-box;
}
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg text { font-family: inherit; fill: var(--text-secondary); }
.chart-title { font-size: 13.5px; font-weight: 700; fill: var(--text-primary); }
.chart-tick { font-size: 11px; fill: var(--text-muted); }
.chart-axis-title { font-size: 12px; font-weight: 600; fill: var(--text-secondary); cursor: help; }
.chart-axis-title:hover { fill: var(--green-bright); }
.chart-legend { font-size: 11.5px; fill: var(--text-secondary); }
.chart-annot { font-size: 11px; fill: var(--text-muted); }
.chart-annot-strong { font-size: 12px; font-weight: 800; fill: var(--text-primary); }
.chart-svg rect, .chart-svg circle { cursor: pointer; transition: opacity .1s ease; }

.chart-tooltip {
  position: fixed; z-index: 999; pointer-events: none;
  background: #050505; border: 1px solid var(--border);
  color: var(--text-primary); font-size: 12.5px; line-height: 1.5;
  padding: 9px 12px; border-radius: 8px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .08s ease;
  max-width: 240px;
}
.chart-tooltip b { color: var(--green-bright); }

.table-scroll { overflow-x: auto; margin-top: 20px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
td.num { color: var(--green-bright); font-weight: 700; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }

.pipeline-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 26px; counter-reset: step; }
.pipeline-step { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; }
.pipeline-step .n { color: var(--green-bright); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; }
.pipeline-step h4 { margin-top: 8px; font-size: 0.95rem; }
.pipeline-step p { color: var(--text-secondary); font-size: 0.85rem; margin: 8px 0 0; }

.quote-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
@media (max-width: 800px) { .quote-compare { grid-template-columns: 1fr; } }
.quote-block { border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--border); }
.quote-block.old { background: rgba(211, 71, 71, 0.06); border-color: rgba(211,71,71,0.35); }
.quote-block.new { background: rgba(29,185,84, 0.07); border-color: rgba(29,185,84,0.35); }
.quote-block .k { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.quote-block.old .k { color: #e88; }
.quote-block.new .k { color: var(--green-bright); }
.quote-block blockquote { margin: 12px 0 0; font-style: italic; color: var(--text-primary); font-size: 1rem; }
.quote-block p.note { color: var(--text-secondary); font-size: 0.85rem; margin-top: 12px; }

.callout {
  border-left: 3px solid var(--green); background: var(--surface-2);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin-top: 24px;
}
.callout .k { color: var(--green-bright); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.callout p { margin: 8px 0 0; color: var(--text-secondary); font-size: 0.92rem; }
.callout.research-question { padding: 26px 30px; border-left-width: 4px; }
.callout.research-question .k { font-size: 0.82rem; }
.callout.research-question p { font-size: 1.3rem; line-height: 1.5; color: var(--text-primary); font-weight: 600; margin-top: 12px; }

ul.plain { margin: 16px 0 0; padding-left: 20px; color: var(--text-secondary); }
ul.plain li { margin-bottom: 8px; }

/* ===== Credits ===== */
.credits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 22px; }
.credit-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
.credit-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.credit-item .ci-t { font-size: 0.72rem; margin-top: 8px; color: var(--text-secondary); }

.footer-note { color: var(--text-muted); font-size: 0.8rem; margin-top: 20px; line-height: 1.7; }

/* ===== Footer ===== */
footer { padding: 50px 0 70px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo { height: 20px; opacity: 0.7; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }

.team { color: var(--text-secondary); font-size: 0.9rem; margin-top: 10px; }
.team strong { color: var(--text-primary); }

/* ===== Spotify application layout ===== */
:root {
  --sidebar: 248px;
  --radius: 8px;
  --maxw: 1240px;
}

body {
  padding-left: var(--sidebar);
  background: #090909;
}

.nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  height: 100vh;
  background: #000;
  border: 0;
  padding: 28px 14px;
}

.nav .wrap {
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.nav-brand { padding: 0 10px 28px; gap: 12px; }
.nav-brand img { height: 28px; }
.nav-brand span { color: #fff; font-size: 1rem; letter-spacing: 0; }
.nav-links { display: flex; flex-direction: column; gap: 5px; }
.nav-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #a7a7a7;
  font-size: .88rem;
  transition: background .18s ease, color .18s ease;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: #181818; }
.nav-icon { width: 24px; color: #d7d7d7; font-weight: 800; text-align: center; }
.nav-label {
  padding: 26px 12px 8px;
  color: #6f6f6f;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero {
  min-height: 650px;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 64px;
  background:
    linear-gradient(0deg, #121212 0%, rgba(18,18,18,.12) 65%),
    radial-gradient(circle at 76% 30%, rgba(30,215,96,.3), transparent 34%),
    linear-gradient(135deg, #173f2a 0%, #0f241a 38%, #161616 100%);
}
.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 390px); gap: 64px; }
.hero-logo { display: none; }
.hero h1 { max-width: 850px; font-size: clamp(3rem, 6.1vw, 6rem); line-height: .96; letter-spacing: -.055em; }
.hero h1 .accent { color: #fff; }
.hero .lede { max-width: 790px; color: #d5d5d5; }
.hero-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 28px 34px rgba(0,0,0,.58));
  transform: rotate(1deg);
}
.play-btn { width: 54px; height: 54px; justify-content: center; padding: 0; font-size: 1.15rem; }

section { padding: 78px 0; border: 0; background: #121212; }
section:nth-of-type(even) { background: #101010; }
section .wrap { position: relative; }
section .wrap::before {
  content: "";
  position: absolute;
  top: -26px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2c2c2c 12%, #2c2c2c 88%, transparent);
}
section:first-of-type .wrap::before { display: none; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.045em; }
.lede { max-width: 840px; }

.stat-tile, .card, .pipeline-step, .chart-panel, .quote-block, .credit-item {
  border-color: transparent;
  background: #181818;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}
.stat-tile:hover, .card:hover, .pipeline-step:hover, .credit-item:hover { background: #242424; transform: translateY(-2px); }
.stat-tile { min-height: 164px; display: flex; flex-direction: column; justify-content: flex-end; }
.stat-tile .v { font-size: 2.45rem; }
.chart-panel { padding: 24px; }
.callout { border: 0; border-radius: var(--radius); background: linear-gradient(135deg, #193d28, #181818 55%); padding: 26px 30px; }
.callout::before { content: "INSIGHT"; display: block; color: #79e69f; font-size: .62rem; font-weight: 900; letter-spacing: .18em; margin-bottom: 6px; }
.track-card { flex-basis: 180px; width: 180px; max-width: 180px; padding: 14px; border: 0; background: #181818; }
.track-card:hover { background: #282828; border-color: transparent; transform: translateY(-5px); }
.track-card img { border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.track-card .t-title { font-size: .9rem; margin-top: 12px; }
.tag { border-radius: 4px; }
table { background: #151515; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #242424; }
th { border-bottom-color: #424242; }
footer { padding: 55px 0 70px; background: #080808; }

@media (max-width: 980px) {
  :root { --sidebar: 0px; }
  body { padding-left: 0; padding-bottom: 72px; }
  .nav {
    inset: auto 0 0 0;
    width: 100%;
    height: 72px;
    padding: 0;
    z-index: 100;
    border-top: 1px solid #292929;
  }
  .nav .wrap { height: 72px; }
  .nav-brand, .nav-toggle, .nav-label { display: none; }
  .nav-links, .nav-links.open {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 100%;
    background: #050505;
    border: 0;
    gap: 0;
  }
  .nav-links a { display: none; border: 0; padding: 7px 4px; min-height: 0; border-radius: 0; flex-direction: column; justify-content: center; gap: 2px; font-size: .62rem; }
  .nav-links a:nth-of-type(1), .nav-links a:nth-of-type(3), .nav-links a:nth-of-type(5), .nav-links a:nth-of-type(8) { display: flex; }
  .nav-icon { font-size: 1rem; }
  .hero { min-height: auto; padding: 64px 0 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { grid-row: 1; justify-content: flex-start; }
  .hero-art img { max-width: 260px; }
  .hero h1 { font-size: clamp(2.7rem, 12vw, 5rem); }
}

@media (max-width: 620px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  section { padding: 62px 0; }
  section .wrap::before { left: 18px; right: 18px; }
  .hero-art img { max-width: 210px; }
  .hero-badges { display: none; }
  .hero .lede { font-size: 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-tile { min-height: 144px; padding: 17px; }
  .stat-tile .v { font-size: 1.7rem; }
  .callout, .callout.research-question { padding: 22px; }
  .callout.research-question p { font-size: 1.08rem; }
}
