/* ─── Smooth scroll handled by JS ─── */

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%; /* 1rem = 16px browser default */
}

body {
  background-color: #161925;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
}

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

a {
  text-decoration: none;
}

/* ─── Typography ─── */
p {
  margin-top: 0;
  margin-bottom: 10px;
}

h1, h2 {
  font-family: 'Host Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1;
}

h1 {
  font-size: clamp(1.875rem, 4.5vw, 3.3125rem); /* 30px → 53px */
  max-width: 669px;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1875rem); /* 24px → 35px */
  margin-bottom: 1rem;
}

.overtitle {
  font-family: 'Host Grotesk', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0;
}

.section-overtitle {
  font-family: 'Host Grotesk', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}


/* ─── Scroll progress bar ─── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: #0aff94;
  z-index: 9999;
  pointer-events: none;
}

/* ─── Shared fade-up animation ─── */
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.stagger-item {
  opacity: 0;
}

.stagger-item.stagger-visible {
  animation: fadeUpIn 0.7s ease forwards;
}

/* ─── Hero animations ─── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero .overtitle {
  opacity: 0;
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 0.2s;
}

.hero h1 {
  opacity: 1;
}

.hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero h1 .word.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-body {
  opacity: 0;
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 0.9s;
}

.hero-meta {
  opacity: 0;
  animation: heroFadeUp 0.7s ease forwards;
  animation-delay: 1.15s;
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.5rem, 10vw, 8.125rem) clamp(4rem, 8vw, 7.5rem);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

@keyframes videoFadeIn {
  to { opacity: 1; }
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}

.hero .overtitle {
  margin-bottom: 0;
}

.hero h1 {
  margin-top: 8px;
  margin-bottom: 24px;
}

.hero-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 1.8vw, 1.25rem); /* 16px → 20px */
  max-width: 523px;
  line-height: 1.5;
  color: #ffffff;
}

.hero-meta {
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Tagline Banner ─── */
.tagline-banner {
  background-color: #0aff94;
  padding: 28px 40px;
  text-align: center;
}

.tagline-banner p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.625rem, 5vw, 3.3125rem); /* 26px → 53px */
  font-weight: 300;
  color: #1e1e1e;
  line-height: 1.2;
}

/* ─── Two-col sections ─── */
.section-two-col {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3.75rem, 7vw, 6.25rem) clamp(1.5rem, 10vw, 8.125rem);
}

#big-picture {
  padding-left: 40px;
}

#big-picture .col-chart {
  flex: 2;
}

#big-picture .col-text {
  flex: 1;
}

#trends .col-chart {
  flex: 2;
}

#trends .col-text {
  flex: 1;
}

.section-two-col.section-reverse {
  flex-direction: row-reverse;
}

/* ─── Big picture text helpers ─── */
.bp-intro {
  margin: 12px 0 6px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
}

.bp-list {
  margin: 0 0 14px 18px;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
}

.bp-list strong {
  color: #ffffff;
  font-weight: 500;
}

.bp-body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
}

.bp-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  border-left: 2px solid rgba(255,255,255,0.1);
  padding-left: 12px;
  margin: 0;
}

.col-chart {
  flex: 1;
}

.col-chart img {
  width: 100%;
  border-radius: 4px;
}

.col-text {
  flex: 1;
}

.col-text h2 {
  margin-top: 8px;
  margin-bottom: 16px;
}

.col-text p:not(.section-overtitle) {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
}

/* ─── Trends chart header ─── */
.trends-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.trends-click-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Trends chart toggle ─── */
.trends-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.trends-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.4);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  padding: 4px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.trends-toggle-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}

.trends-toggle-btn.active {
  background: #0aff94;
  border-color: #0aff94;
  color: #161925;
}

/* ─── Trends songs panel ─── */
.trends-songs-panel {
  margin-top: 16px;
  background: #1e2333;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  animation: slideDown 0.25s ease;
}

.trends-songs-panel.hidden {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tsp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tsp-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
}

.tsp-title strong {
  color: #0aff94;
  font-weight: 400;
}

.tsp-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s;
}

.tsp-close:hover { color: #ff4d6d; }

.tsp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tsp-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 6px;
}

.tsp-track {
  color: #ffffff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tsp-artist {
  color: rgba(255,255,255,0.4);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tsp-streams {
  color: #0aff94;
  white-space: nowrap;
  font-size: 11px;
}

/* ─── Top Songs ─── */
.section-top-songs {
  background-color: #0aff94;
  color: #1e1e1e;
  position: relative;
  padding: 60px 0 0 0;
  overflow: hidden;
}

.top-songs-text {
  padding: 0 clamp(1.5rem, 10vw, 8.125rem) 2.5rem;
  max-width: 720px;
}

.section-top-songs p.section-overtitle {
  font-family: 'Inter', sans-serif !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  color: rgba(0,0,0,0.5) !important;
}

.section-top-songs .top-songs-text h2 {
  font-family: 'Host Grotesk', 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 35px;
  color: #1e1e1e;
  margin-top: 8px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.section-top-songs p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(0,0,0,0.6);
  line-height: 1.6;
}

.top-songs-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ts-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(0,0,0,0.55);
}

.ts-legend-item::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0.85;
}

#top-songs-chart {
  width: calc(100% - 80px);
  margin: 0 40px;
  display: block;
}

.top-songs-legend {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.tsl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0,0,0,0.55);
}

.tsl-swatch {
  display: inline-block;
  flex-shrink: 0;
}

.tsl-bar {
  width: 12px;
  height: 12px;
  background: #001409;
  border-radius: 2px;
}

.tsl-line {
  width: 22px;
  height: 3px;
  background: #007A33;
  border-radius: 2px;
  position: relative;
}

.tsl-line::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007A33;
  border: 1.5px solid #0aff94;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ts-legend-item {
  transition: opacity 0.2s;
}

.ts-legend-item:hover {
  opacity: 0.7;
}

.ts-legend-item.ts-legend-active {
  outline: 2px solid rgba(0,0,0,0.4);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ─── Top Songs sort toggle ─── */
.ts-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 clamp(1.5rem, 10vw, 8.125rem) 1rem;
}

.ts-sort-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(0,0,0,0.4);
}

.ts-sort-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 20px;
  color: rgba(0,0,0,0.4);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  padding: 4px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.ts-sort-btn:hover {
  border-color: rgba(0,0,0,0.5);
  color: rgba(0,0,0,0.7);
}

.ts-sort-btn.active {
  background: rgba(0,0,0,0.75);
  border-color: transparent;
  color: #0aff94;
}

#artists .col-chart {
  flex: 2;
}

#artists .col-text {
  flex: 1;
}

#artists-chart {
  width: 100%;
  display: block;
  overflow: hidden;
}

/* ─── Outliers ─── */
.section-outliers {
  padding: clamp(3.75rem, 7vw, 6.25rem) clamp(1.5rem, 10vw, 8.125rem);
}

.section-outliers h2 {
  margin-top: 8px;
  margin-bottom: 16px;
}

.outliers-intro {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  max-width: 700px;
  margin-bottom: 56px;
}

.outlier-charts-row {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  margin-top: 48px;
}

.outlier-chart-wrap {
  flex: 1;
  min-width: 0;
}

.outlier-chart-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 18px;
}

.outlier-chart-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}

.outlier-chart-title {
  font-family: 'Host Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.outlier-chart-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
  margin-bottom: 24px;
}

.outlier-chart-caption {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.35);
  margin: 0 0 10px 0;
  line-height: 1.5;
}

/* ─── What Drives Success ─── */
.section-success {
  min-height: 100vh;
  background-image: url('images/tiktoksinger.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.75rem, 7vw, 6.25rem) clamp(1.5rem, 10vw, 8.125rem);
  position: relative;
}

.section-success::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(22, 25, 37, 0.88);
}

.success-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.success-content h2 {
  margin-top: 8px;
  margin-bottom: 16px;
}

.success-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}

.success-stats {
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.success-stat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-left: 2px solid rgba(10,255,148,0.3);
  padding-left: 16px;
}

.stat-number {
  font-family: 'Host Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 38px;
  color: #0aff94;
  line-height: 1;
  white-space: nowrap;
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,0.45);
  max-width: 200px;
}

.stat-label a,
.success-body a,
.col-text a,
.outliers-intro a,
.outlier-chart-desc a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ─── Inline scatterplot legend ─── */
.scatter-inline-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.scatter-inline-legend .legend-items {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.scatter-inline-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
}

/* ─── Chart expand button ─── */
.chart-expand-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.chart-expand-btn:hover {
  border-color: #0aff94;
  color: #0aff94;
}

/* ─── Fullscreen overlay ─── */
.chart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 12, 20, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.chart-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.chart-overlay.hidden {
  display: none;
}

.chart-overlay-inner {
  width: 94vw;
  max-height: 94vh;
  background: #161925;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.chart-overlay.visible .chart-overlay-inner {
  transform: scale(1);
  opacity: 1;
}

.chart-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-overlay-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scatter-zoom-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 12px;
}

.scatter-zoom-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
}

.scatter-zoom-level {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0aff94;
  min-width: 32px;
}

.scatter-reset-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.scatter-reset-btn:hover {
  border-color: #0aff94;
  color: #0aff94;
}

/* ─── Scatter controls ─── */
.scatter-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.scatter-search-wrap {
  position: relative;
}

.scatter-search-wrap input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  padding: 6px 32px 6px 12px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.scatter-search-wrap input::placeholder {
  color: rgba(255,255,255,0.3);
}

.scatter-search-wrap input:focus {
  border-color: #0aff94;
}

.scatter-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.15s;
}

.scatter-clear:hover {
  color: #ff4d6d;
}

.scatter-clear.hidden {
  display: none;
}

.scatter-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1e2333;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 2100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.scatter-suggestions.hidden {
  display: none;
}

.scatter-suggestions li {
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scatter-suggestions li:hover,
.scatter-suggestions li.suggestion-active {
  background: rgba(10, 255, 148, 0.12);
  color: #0aff94;
}

.suggestion-artist {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

.scatter-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.45);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  padding: 4px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filter-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}

.filter-btn.active {
  background: #0aff94;
  border-color: #0aff94;
  color: #161925;
}

.scatter-legend {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.scatter-legend .legend-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legend-title {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.chart-overlay-hint {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
}

.chart-close-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 5px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.chart-close-btn:hover {
  border-color: #ff4d6d;
  color: #ff4d6d;
}


/* ─── Outlier song lightbox ─── */
.outlier-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 12, 20, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.outlier-lightbox.visible {
  opacity: 1;
  pointer-events: all;
}

.outlier-lightbox.hidden {
  display: none;
}

.outlier-lightbox-card {
  position: relative;
  background: #1a1d2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 48px 52px;
  max-width: 420px;
  width: 90vw;
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.outlier-lightbox.visible .outlier-lightbox-card {
  transform: scale(1);
  opacity: 1;
}

.outlier-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.outlier-lightbox-close:hover { color: #ffffff; }

.olb-overtitle {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0 0 12px;
}

.olb-track {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  line-height: 1.2;
}

.olb-artist {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  margin: 0 0 28px;
}

.olb-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.olb-stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-left: 2px solid rgba(255,255,255,0.1);
  padding-left: 14px;
}

.olb-stat-number {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.olb-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
}

/* ─── Trends lightbox list ─── */
.trends-lightbox-card {
  max-width: 560px;
}

.tlb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tlb-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tlb-list li:last-child { border-bottom: none; }

.tlb-track {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  flex: 2;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tlb-artist {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.tlb-streams {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #0aff94;
  white-space: nowrap;
  text-align: right;
  min-width: 52px;
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1000;
  background-color: #0aff94;
  padding: 1.75rem clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1e1e1e;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #1e1e1e;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1;
  transition: opacity 0.2s;
}

.footer-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(30,30,30,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-meta:hover {
  color: rgba(30,30,30,0.8);
}

.footer-nav a:hover {
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════
   REDUCED MOTION — disable heavy animations
══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  /* Kill all CSS animations and transitions */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  /* Show all stagger items immediately */
  .stagger-item { opacity: 1; }

  /* Show hero elements immediately */
  .hero .overtitle,
  .hero-body,
  .hero-meta,
  .hero h1 .word,
  .hero-video { opacity: 1; animation: none; }

  /* Disable parallax (handled in JS via prefersReducedMotion flag) */
  .hero-video { will-change: auto; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — iPad / Tablet (max 1024px)
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  #top-songs-chart { width: calc(100% - 40px); margin: 0 20px; }
  .outlier-charts-row { gap: 32px; }
  .success-stats { gap: 24px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — iPad Portrait (max 900px — covers 11" iPad at 834px)
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Stack all two-col sections: text on top, chart below */
  .section-two-col {
    flex-direction: column;
    padding: 3rem 2rem;
  }

  /* Sections where chart comes first in DOM should flip to text-top */
  #big-picture,
  #nostalgia,
  #artists {
    flex-direction: column-reverse;
  }

  /* Trends already has text first in DOM, so column is correct */
  #trends {
    flex-direction: column;
  }

  .col-chart,
  .col-text {
    flex: unset;
    width: 100%;
  }

  #big-picture { padding-left: 2rem; }

  /* Top Songs */
  .section-top-songs { padding-top: 3rem; }
  .top-songs-text { max-width: 100%; padding: 0 2rem 2rem; }
  #top-songs-chart { width: calc(100% - 32px); margin: 0 16px; }

  /* Outliers */
  .section-outliers { padding: 3rem 2rem; }
  .outlier-charts-row { flex-direction: column; gap: 48px; }

  /* Verdict */
  .section-success { min-height: auto; padding: 3rem 2rem; }
  .success-content { max-width: 100%; }
  .success-stats { flex-direction: column; gap: 24px; }
  .stat-label { max-width: 100%; }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .footer-nav {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile (max 640px)
══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Hero */
  .hero-content { max-width: 100%; }
  .hero-body    { max-width: 100%; }

  /* Tagline */
  .tagline-banner { padding: 24px; }

  /* Two-col sections — stack vertically */
  .section-two-col { flex-direction: column; }
  #nostalgia        { flex-direction: column; }
  #big-picture      { padding-left: clamp(1.5rem, 10vw, 8.125rem); }
  .col-chart, .col-text { flex: unset; width: 100%; }

  /* Top Songs */
  .top-songs-text  { max-width: 100%; }
  #top-songs-chart { width: calc(100% - 16px); margin: 0 8px; }

  /* Artists — text above chart on mobile */
  #artists              { flex-direction: column-reverse; }
  #artists .col-chart,
  #artists .col-text    { flex: unset; width: 100%; }

  /* Outliers */
  .outlier-charts-row { flex-direction: column; gap: 48px; }

  /* Verdict */
  .section-success { min-height: auto; }
  .success-content { max-width: 100%; }
  .success-stats   { flex-direction: column; gap: 24px; }
  .stat-label      { max-width: 100%; }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .footer-nav {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
}

/* ─── Side Nav ─── */
#side-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#side-nav.side-nav-visible {
  opacity: 1;
  pointer-events: auto;
}

.side-nav-item {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  transition: color 0.3s ease;
  cursor: pointer;
}

.side-nav-item:hover {
  color: rgba(255,255,255,0.85);
}

.side-nav-item.side-nav-active {
  color: #ffffff;
}


@media (max-width: 900px) {
  #side-nav { right: 12px; }
}

@media (max-width: 640px) {
  #side-nav { display: none; }
}

/* ─── Music Player ─── */
#music-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#music-hint {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
  width: 100%;
}

#music-hint.hint-hidden {
  opacity: 0;
}

#music-player {
  width: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 40px;
  padding: 8px 14px 8px 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

#music-play {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

#music-play:hover {
  color: #ffffff;
}

#music-play svg {
  width: 18px;
  height: 18px;
}

#music-waveform {
  display: block;
  width: 100px;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  #music-player { display: none; }
}
