* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark theme design system */
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --text: #ffffff;
  --text-body: #a3a3a3;
  --muted: rgba(255, 255, 255, 0.5);
  --accent: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --accent-contrast: #ffffff;
  --accent-hover: #b36af7;
  /* Card/outline tints — follow settings accent (not hardcoded purple) */
  --accent-ring-soft: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 40%, transparent);
  --accent-ring-strong: color-mix(in srgb, var(--accent) 50%, transparent);

  --red: #ef4444;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-width: 0;
  cursor: none;
}

*, *::before, *::after {
  cursor: none !important;
}

/* Touch-friendly minimums (44px recommended by Apple/Google) */
@media (pointer: coarse) {
  .btn, .btn-gold, .btn-ghost,
  .btn-hero-primary, .btn-hero-secondary {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  .play-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .nav-links a {
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .hamburger {
    min-width: 44px;
    min-height: 44px;
  }
  .settings-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .license-modal-close,
  .settings-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

nav .logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s, text-shadow 0.3s;
}

nav .logo:hover {
  opacity: 0.9;
  text-shadow: 0 0 20px var(--accent-glow);
}

.logo-img-wrap {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  display: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav drawer — dim + block taps behind menu (toggled in main.js) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

.nav-overlay.visible {
  display: block;
}

html.nav-menu-open,
body.nav-menu-open,
html.beats-filter-open,
body.beats-filter-open {
  overflow: hidden;
}

/* Section base */
section {
  min-height: auto;
  padding: 6rem 1.5rem 4.5rem;
  max-width: 1320px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 4rem;
  overflow: hidden;
}

/* Full-screen hero with dark gradient */
.hero-fullscreen {
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Fade to --bg with many stops (no transparent) to avoid banding / “rings” of black */
  background: radial-gradient(
    ellipse 115% 75% at 50% 44%,
    color-mix(in srgb, var(--accent) 20%, var(--bg)) 0%,
    color-mix(in srgb, var(--accent) 11%, var(--bg)) 15%,
    color-mix(in srgb, var(--accent) 6%, var(--bg)) 30%,
    color-mix(in srgb, var(--accent) 2.5%, var(--bg)) 45%,
    color-mix(in srgb, var(--accent) 0.8%, var(--bg)) 58%,
    var(--bg) 72%,
    var(--bg) 100%
  );
  animation: heroGlow 10s ease-in-out infinite;
  pointer-events: none;
  transform: translateZ(0);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Soft bottom weight — stepped alpha on same base as --bg */
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 0) 38%,
    rgba(10, 10, 10, 0.04) 58%,
    rgba(10, 10, 10, 0.12) 78%,
    rgba(10, 10, 10, 0.22) 100%
  );
  pointer-events: none;
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}


.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: var(--text);
  text-shadow: 0 0 40px var(--accent-glow);
  margin: 0;
}

.hero-subheadline {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-body);
  margin: 1rem 0 2rem;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Hero button styles */
.btn-hero-primary,
.btn-hero-secondary {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.35s ease;
  display: inline-block;
  cursor: pointer;
}

.btn-hero-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 2px solid var(--accent);
}

.btn-hero-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px) scale(1.02);
}

.btn-hero-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-hero-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-3px);
}

/* Legacy hero styles (for other pages if any) */
.hero-bg-word {
  position: absolute;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(8rem, 28vw, 22rem);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.03);
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 0;
}

.hero:not(.hero-fullscreen)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Nav over dark hero - light text */
body.page-home nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.8);
}

body.page-home nav:not(.scrolled) .nav-links a:hover,
body.page-home nav:not(.scrolled) .nav-links a.active {
  color: #fff;
}

body.page-home nav:not(.scrolled) .nav-links a::after {
  background: var(--accent);
}

body.page-home nav:not(.scrolled) .nav-links a.active::after {
  background: var(--accent);
}

body.page-home nav:not(.scrolled) .hamburger span {
  background: var(--text);
}

body.page-home nav:not(.scrolled) .nav-links.open a {
  color: var(--text-body);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-decoration: none;
  /* Invisible hit area — same rough footprint as the old line, no visible bar */
  min-width: 48px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.scroll-indicator:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Buttons */
.btn {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.35s ease;
  text-decoration: none;
  border: 2px solid transparent;
  display: inline-block;
  touch-action: manipulation;
}

.btn-gold {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-gold:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover {
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* Section headings */
.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.2em;
  margin-bottom: 3rem;
  color: var(--text);
  display: block;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

/* About page */
.about-intro {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem 2.5rem;
  margin-bottom: 0.5rem;
}

.about-bio {
  flex: 1 1 280px;
  min-width: 0;
}

.about-bio p {
  font-size: 1rem;
  color: var(--text-body);
  max-width: 560px;
  margin-bottom: 1rem;
}

#about .about-profile-slot {
  flex: 0 1 320px;
  width: min(100%, 320px);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 700px) {
  .about-intro {
    flex-direction: column;
    align-items: stretch;
  }

  #about .about-intro {
    align-items: center;
  }

  #about .about-profile-slot {
    flex: none;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
}

#about .about-profile-placeholder {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px dashed var(--accent-ring);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

#about .about-profile-placeholder-text {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 11rem;
  line-height: 1.5;
}

#about .about-profile-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  border: 1px solid var(--accent-ring-soft);
}

#about {
  padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
}

#about > .section-heading:first-of-type {
  text-align: center;
  border-left: none;
  padding-left: 0;
  margin-left: auto;
  margin-right: auto;
}

#about > .section-heading:first-of-type::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 3px;
  margin: 0.85rem auto 0;
  background: var(--accent);
}

#about .about-intro {
  justify-content: center;
  align-items: center;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

#about .about-bio {
  text-align: center;
}

#about .about-bio p {
  margin-left: auto;
  margin-right: auto;
}

#about .about-tracks-heading {
  text-align: center;
  border-left: none;
  padding-left: 0;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.5rem;
  margin-top: 3rem;
}

#about .about-tracks-heading::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 3px;
  margin: 0.85rem auto 0;
  background: var(--accent);
}

#about .my-tracks {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.sound-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.sound-card {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  transition: all 0.35s ease;
}

.sound-card:hover {
  box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.sound-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.sound-card p {
  font-size: 0.9rem;
  color: var(--text-body);
}

.how-it-works {
  margin-top: 4rem;
}

.how-it-works h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  color: var(--text);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 2rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.step p {
  font-size: 0.95rem;
  color: var(--text-body);
}

.cta-banner {
  margin-top: 4rem;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cta-banner h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  color: var(--text);
}

/* My Tracks (about page) */
.my-tracks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.track-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.track-card-image {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}

.track-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-card-info {
  flex: 1;
  min-width: 0;
}

.track-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.track-card-artists {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 0.25rem;
}

.track-card-credit {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.track-card-links {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.track-card-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}

.track-card-links a:hover {
  color: var(--accent);
  background: rgba(168, 85, 247, 0.1);
}

.track-card-links svg {
  width: 18px;
  height: 18px;
}

.track-card-links .instagram-icon-img,
.track-card-links .apple-music-icon-img,
.track-card-links .spotify-icon-img {
  width: 18px;
  height: 18px;
}

/* SoundCloud mark reads smaller at equal px; nudge up next to Spotify / Apple */
.track-card-links .soundcloud-icon-img {
  width: 24px;
  height: 24px;
}

@media (max-width: 640px) {
  .track-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .track-card-info {
    width: 100%;
  }

  .track-card-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .track-card-image {
    width: 90px;
    height: 90px;
  }

  .track-card {
    gap: 1rem;
  }

  .track-card-title {
    font-size: 1.2rem;
  }

  .track-card-links {
    flex-direction: row;
  }
}

/* Featured beats section (homepage) — starts below full-viewport hero */
body.page-home .hero.hero-fullscreen {
  box-sizing: border-box;
  min-height: 100svh;
  min-height: 100dvh;
  padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
  /* Extra bottom breathing room (replaces visual weight of removed scroll line) */
  padding-bottom: calc(4.5rem + 48px);
}

/* Stats section (homepage) */
.home-stats-section {
  padding: 3.25rem 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
}

body.page-home .home-stats-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 4.25rem;
  background: var(--bg);
}

.home-stats-section .section-heading {
  margin-bottom: 2rem;
}

body.page-home .home-stats-section .section-heading {
  text-align: center;
  border-left: none;
  padding-left: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.25rem;
}

body.page-home .home-stats-section .section-heading::after {
  content: '';
  display: block;
  width: 3.5rem;
  height: 3px;
  margin: 0.85rem auto 0;
  background: var(--accent);
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.home-stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
}

.home-stat-value {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.25rem, 6vw, 3rem);
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.home-stat-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .home-stats-section {
    padding: 2.75rem 1.25rem;
  }

  .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .home-stat-card {
    padding: 1.35rem 1rem;
  }
}

@media (max-width: 380px) {
  .home-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Email signup section (homepage) */
.email-signup-section {
  padding: 3.25rem 1.5rem;
  text-align: center;
  background: transparent;
  border-top: none;
}

.email-signup-inner {
  max-width: 480px;
  margin: 0 auto;
}

.email-signup-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.email-signup-sub {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 1.5rem;
}

.email-signup-form {
  margin-bottom: 0;
}

.email-signup-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.email-signup-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--text-body);
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}

.email-signup-input::placeholder {
  color: var(--muted);
}

.email-signup-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.email-signup-btn {
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

.email-signup-success {
  display: none;
  font-size: 0.95rem;
  color: var(--accent);
  margin-top: 1rem;
}

.email-signup-form.hidden + .email-signup-success {
  display: block;
}

/* Beat Store */
.beats-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.beats-section > .section-heading,
.beats-section > .beats-filter-toggle {
  flex: 1 1 100%;
}

/* Keep licensing on its own row; otherwise it shares a flex line with .beats-main and squeezes the grid into narrow “pillars”. */
.beats-section > .licensing-section {
  flex: 1 1 100%;
}

.beats-sidebar-overlay {
  display: none;
  pointer-events: none;
}

.beats-filter-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.35s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.beats-filter-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.filter-toggle-icon {
  font-size: 1.1rem;
}

.beats-sidebar {
  flex: 0 0 248px;
  width: 248px;
  max-width: 100%;
  position: sticky;
  top: 5.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow);
}

.beats-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.beats-sidebar-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--text);
}

.beats-filter-close {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.beats-filter-close:hover {
  color: var(--text);
}

.beats-filters .filter-group {
  margin-bottom: 1.1rem;
}

.beats-filters .filter-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-body);
  cursor: pointer;
  font-weight: 400;
}

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}

.filter-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
}

.filter-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.beats-filters .filter-range {
  width: 100%;
  max-width: 11.5rem;
  margin: 0 auto;
  gap: 0.35rem;
  padding: 0 0.35rem;
  box-sizing: border-box;
}

.beats-filters .filter-range input[type="range"] {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
}

.beats-filters .filter-range input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
}

.beats-filters .filter-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
}

.beats-filters .filter-range-labels {
  max-width: 11.5rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.35rem;
  box-sizing: border-box;
}

.beats-filters select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-body);
  cursor: pointer;
}

.beats-filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-clear {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.55rem;
  font-size: 0.8rem;
}

.beats-main {
  flex: 1;
  min-width: 0;
}

.beats-results {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.beats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.beats-grid .beat-card {
  padding: 1.15rem;
}

.beats-grid .beat-visual {
  margin: -1.15rem -1.15rem 0.85rem -1.15rem;
}

@media (max-width: 1180px) {
  .beats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.beats-loading-hint,
.beats-manifest-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 2rem 1rem;
  margin: 0;
}

.beats-manifest-error {
  color: var(--text-body);
  max-width: 36rem;
  justify-self: center;
}

.beat-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
  touch-action: manipulation;
  contain: layout style;
}

.beat-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-ring-soft), var(--shadow-glow);
  border-color: var(--accent-ring-soft);
}

.beat-card.is-playing {
  border-color: var(--accent-ring-strong);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-ring), var(--shadow-glow);
}

.beat-card.is-playing:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-ring-strong), 0 0 32px var(--accent-glow);
}

.beat-card.hidden {
  display: none;
}

/* Beat Visual Component - reusable wrapper for video/image/placeholder
   TODO: Replace with real beat visual assets.
   To swap: In HTML, replace .beat-visual-placeholder with:
     <img src="path/to/cover.jpg" alt="" loading="lazy" decoding="async">  OR
     <video loop muted playsinline preload="metadata"><source src="path/to/visual.mp4" type="video/mp4"></video>
   Use loading="lazy" and decoding="async" on images for performance. */
.beat-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  background: var(--bg-elevated);
}

.beat-visual-placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  overflow: hidden;
}

.beat-visual-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.08) 0%,
    rgba(168, 85, 247, 0.18) 50%,
    rgba(168, 85, 247, 0.05) 100%
  );
}

.beat-visual-placeholder::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 3px,
    rgba(168, 85, 247, 0.25) 3px,
    rgba(168, 85, 247, 0.25) 5px
  );
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpolyline points='0,55 10,40 20,50 30,20 40,45 50,10 60,35 70,25 80,50 90,15 100,40 110,30 120,50 130,20 140,45 150,10 160,35 170,55 180,25 190,45 200,55' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpolyline points='0,55 10,40 20,50 30,20 40,45 50,10 60,35 70,25 80,50 90,15 100,40 110,30 120,50 130,20 140,45 150,10 160,35 170,55 180,25 190,45 200,55' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
}

/* When swapping for real assets: use .beat-visual img or .beat-visual video and hide .beat-visual-placeholder */
.beat-visual img,
.beat-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.beat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.beat-header-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.beat-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.45rem;
  border-radius: var(--radius-sm);
}

.beat-tag-free {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

body.light-mode .beat-tag-free {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.25);
}

.beat-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--text);
}

.beat-genre {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}

.beat-info {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.waveform {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin-bottom: 1rem;
  min-height: 32px;
}

/* Fallback: subtle looping gradient when no bars (e.g. before JS) */
.waveform::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.08) 0%,
    rgba(168, 85, 247, 0.2) 50%,
    rgba(168, 85, 247, 0.08) 100%
  );
  background-size: 200% 100%;
  animation: waveform-placeholder 2.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.waveform:has(.waveform-bar)::before {
  display: none;
}

@keyframes waveform-placeholder {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.waveform-bar {
  width: 4px;
  background: rgba(168, 85, 247, 0.5);
  border-radius: var(--radius-sm);
  min-height: 4px;
  transform-origin: center bottom;
  animation: waveform-idle 2s ease-in-out infinite;
}

.waveform-bar:nth-child(odd) {
  animation-delay: 0.1s;
}

.waveform-bar:nth-child(3n) {
  animation-delay: 0.2s;
}

.waveform-bar:nth-child(5n) {
  animation-delay: 0.3s;
}

@keyframes waveform-idle {
  0%, 100% { transform: scaleY(0.6); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Active waveform when beat is playing (not when paused) */
.beat-card.is-playing:not(.is-paused) .waveform-bar {
  animation: waveform-active 0.5s ease-in-out infinite;
}

.beat-card.is-playing:not(.is-paused) .waveform-bar:nth-child(odd) {
  animation-delay: 0s;
}

.beat-card.is-playing:not(.is-paused) .waveform-bar:nth-child(3n) {
  animation-delay: 0.08s;
}

.beat-card.is-playing:not(.is-paused) .waveform-bar:nth-child(5n) {
  animation-delay: 0.16s;
}

.beat-card.is-playing:not(.is-paused) .waveform-bar:nth-child(2n) {
  animation-delay: 0.04s;
}

.beat-card.is-playing:not(.is-paused) .waveform-bar:nth-child(4n) {
  animation-delay: 0.12s;
}

@keyframes waveform-active {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .waveform-bar {
    animation: none;
    transform: none;
  }
  .beat-card.is-playing:not(.is-paused) .waveform-bar {
    animation: none;
    opacity: 1;
  }
  .waveform::before {
    animation: none;
  }
}

.beat-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.play-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  touch-action: manipulation;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.35s ease;
}

.play-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.beat-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  color: var(--accent);
}

.beat-card .btn-gold {
  width: 100%;
  display: block;
  text-align: center;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.beat-controls .btn-gold {
  width: auto;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  border: none;
}

/* Type beat pages */
.type-beats-h1 {
  margin-bottom: 1rem;
}

.type-beats-intro {
  font-size: 1rem;
  color: var(--text-body);
  max-width: 560px;
  margin-bottom: 1rem;
}

.type-beats-back {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.type-beats-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.type-beats-empty-msg {
  color: var(--text-body);
  font-size: 1rem;
}

.type-beats-empty-msg a {
  color: var(--accent);
  text-decoration: none;
}

.type-beats-empty-msg a:hover {
  text-decoration: underline;
}

.type-beats-links {
  margin-top: 3rem;
}

.type-beats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.type-beats-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.type-beats-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.licensing-section {
  margin-top: 4rem;
}

.licensing-section h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  color: var(--text);
}

.license-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.license-card {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s ease;
}

.license-card:hover {
  box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.license-card-popular {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow), 0 0 28px var(--accent-glow);
}

.license-popular-strip {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-align: center;
  background: var(--accent);
  color: var(--accent-contrast);
  margin: -1.5rem -1.5rem 0.75rem -1.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  line-height: 1.2;
}

.license-card h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.license-card ul {
  list-style: none;
  margin-bottom: 1rem;
}

.license-card li {
  font-size: 0.85rem;
  color: var(--text-body);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.license-card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.license-card .price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.license-card .btn-gold,
.license-card .btn-ghost {
  width: 100%;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
  border: none;
  display: block;
}

.license-card .license-learn-more-btn {
  margin-top: 0.35rem;
}

.licenses-intro {
  color: var(--text-body);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 42rem;
  margin: 0;
}

.licenses-intro-secondary {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 42rem;
  margin: 1.1rem 0 0;
  opacity: 0.95;
}

.licenses-lead {
  margin-bottom: 2.75rem;
}

.licenses-page-note {
  margin-top: 3.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 42rem;
}

.licenses-page-note a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.licenses-page-note a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

#licenses {
  padding-top: 7rem;
  padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

#licenses .section-heading {
  margin-bottom: 1.75rem;
  font-size: clamp(2.25rem, 5.5vw, 3.35rem);
}

#licenses .license-cards {
  gap: 2rem;
}

#licenses .license-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.85rem;
  min-height: 17.5rem;
}

#licenses .license-card ul {
  flex: 1 1 auto;
  margin-bottom: 1.25rem;
}

#licenses .license-popular-strip {
  margin: -2rem -1.85rem 0.875rem -1.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.7rem;
}

#licenses .license-card h4 {
  font-size: 1.45rem;
  margin-bottom: 1rem;
}

#licenses .license-card li {
  font-size: 0.95rem;
  /* Keep padding-left so ::before bullet does not overlap text (padding shorthand was clearing it) */
  padding: 0.32rem 0 0.32rem 1rem;
}

#licenses .license-card .price {
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
}

#licenses .license-card .license-learn-more-btn {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.licenses-teaser {
  color: var(--text-body);
  font-size: 0.9rem;
}

.licenses-teaser a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.licenses-teaser a:hover {
  opacity: 0.8;
}

/* License picker modal */
.license-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}

.license-modal-overlay.open {
  display: flex;
}

.license-modal {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  padding: 2.5rem 2rem 2rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  max-height: min(90vh, calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-y: auto;
}

.license-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.license-modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.license-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.license-modal-beat {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.license-modal-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.license-modal-free-option {
  display: none;
}

.license-modal-overlay.license-modal-overlay--free-beat .license-modal-free-option {
  display: flex;
}

.license-modal--wide {
  max-width: min(840px, 96vw);
}

.license-modal-overlay--free-beat .license-modal-options {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .license-modal-overlay--free-beat .license-modal-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.license-modal-option {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.license-modal-option h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--text);
}

.license-modal-option ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.license-modal-option li {
  font-size: 0.8rem;
  color: var(--text-body);
  padding: 0.2rem 0;
  padding-left: 1rem;
  position: relative;
}

.license-modal-option li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.license-modal-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
}

.license-modal-btn {
  width: 100%;
  text-align: center;
  padding: 0.65rem;
  font-size: 0.85rem;
  border: none;
}

.license-modal-popular {
  border: 2px solid var(--accent);
  box-shadow: 0 0 22px var(--accent-glow);
}

.license-popular-strip--modal {
  margin: -1.25rem -1.25rem 0.65rem -1.25rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
}

.license-picker-btn {
  width: 100%;
  display: block;
  text-align: center;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  border: none;
}

@media (max-width: 600px) {
  .license-modal {
    padding: 2rem 1.25rem 1.5rem;
  }

  .license-modal-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .license-modal-overlay--free-beat .license-modal-options {
    grid-template-columns: 1fr;
  }
}

/* Credits */
.marquee-wrap {
  overflow: hidden;
  padding: 1rem 0;
  margin-bottom: 3rem;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.marquee {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  white-space: nowrap;
  padding: 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-item strong {
  color: var(--text);
  margin-right: 0.5rem;
}

.credits-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.credit-card {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.35s ease;
}

.credit-card:hover {
  box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.credit-img {
  height: 160px;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(168, 85, 247, 0.15) 100%);
  position: relative;
  overflow: hidden;
}

.credit-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(168, 85, 247, 0.15) 50%, transparent 60%);
  pointer-events: none;
}

.credit-body {
  padding: 1.25rem;
}

.credit-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.credit-artist {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.credit-desc {
  font-size: 0.85rem;
  color: var(--text-body);
  margin-bottom: 1rem;
}

.credit-stream-btn {
  font-size: 0.8rem;
  padding: 0.5rem 1.25rem;
  margin-top: 0.75rem;
  display: inline-block;
}

.services-section {
  margin-top: 4rem;
}

.services-section h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  color: var(--text);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.service-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-body);
}

.service-item::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
}

/* Contact */
.contact-intro {
  text-align: center;
  color: var(--text-body);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.contact-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.custom-select {
  position: relative;
  margin-bottom: 1rem;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.custom-select-trigger::after {
  content: '▾';
  color: var(--muted);
  font-size: 1rem;
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.custom-select-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  list-style: none;
  z-index: 100;
  box-shadow: var(--shadow);
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-options li {
  padding: 0.85rem 1.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.custom-select-options li:hover,
.custom-select-options li.selected {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form .btn-gold {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}

.contact-form.hidden {
  display: none;
}

.contact-form-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-form-error {
  display: none;
  font-size: 0.9rem;
  color: var(--red);
  margin: 0 0 0.75rem;
  text-align: center;
  line-height: 1.4;
}

.contact-form-error.visible {
  display: block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form-success.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.form-success svg {
  width: 48px;
  height: 48px;
  color: var(--accent);
}

.form-success p {
  font-size: 1.1rem;
  color: var(--text-body);
}

.contact-email-row {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-email-row .contact-info-item {
  margin: 0;
}

.contact-details {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-body);
}

.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info-item a {
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info-item a:hover {
  color: var(--accent);
}

.response-time {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

#contact {
  padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-body);
  transition: color 0.35s, transform 0.35s, background 0.25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.social-links a:hover {
  color: var(--accent);
  transform: scale(1.1);
  background: rgba(168, 85, 247, 0.1);
}

.social-links svg {
  width: 32px;
  height: 32px;
}

/* Social brand PNGs: white on dark UI, black in light mode */
.soundcloud-icon-img,
.instagram-icon-img,
.apple-music-icon-img,
.spotify-icon-img {
  display: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
}

.soundcloud-for-dark-bg,
.instagram-for-dark-bg,
.apple-music-for-dark-bg,
.spotify-for-dark-bg {
  display: block;
}

.soundcloud-for-light-bg,
.instagram-for-light-bg,
.apple-music-for-light-bg,
.spotify-for-light-bg {
  display: none;
}

body.light-mode .soundcloud-for-dark-bg,
html.saint-light-early .soundcloud-for-dark-bg,
body.light-mode .instagram-for-dark-bg,
html.saint-light-early .instagram-for-dark-bg,
body.light-mode .apple-music-for-dark-bg,
html.saint-light-early .apple-music-for-dark-bg,
body.light-mode .spotify-for-dark-bg,
html.saint-light-early .spotify-for-dark-bg {
  display: none;
}

body.light-mode .soundcloud-for-light-bg,
html.saint-light-early .soundcloud-for-light-bg,
body.light-mode .instagram-for-light-bg,
html.saint-light-early .instagram-for-light-bg,
body.light-mode .apple-music-for-light-bg,
html.saint-light-early .apple-music-for-light-bg,
body.light-mode .spotify-for-light-bg,
html.saint-light-early .spotify-for-light-bg {
  display: block;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.footer-terms-btn {
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-terms-btn:hover {
  color: var(--accent);
}

footer .social-links a {
  color: var(--muted);
}

footer .social-links a:hover {
  color: var(--accent);
}

footer .social-links .instagram-icon-img {
  width: calc(32px * 1.05 * 1.05);
  height: calc(32px * 1.05 * 1.05);
}

/* ========== Responsive Breakpoints ========== */
/* Tablet: 992px */
@media (max-width: 992px) {
  .beats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

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

  .credits-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .license-cards .license-card {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  .nav-end {
    gap: 0.65rem;
  }

  nav {
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem;
  }

  .section-heading {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    letter-spacing: 0.15em;
  }

  section {
    padding: 4.25rem 1.25rem 2.75rem;
    max-width: 100%;
  }

  #about {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  #contact {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }

  /* Hero */
  .hero {
    padding-top: 3rem;
  }

  .hero-headline {
    font-size: clamp(1.9rem, 8vw, 3rem);
  }

  .hero-subheadline {
    font-size: 0.9rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    gap: 0.75rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    text-align: center;
    min-height: 48px;
  }

  .scroll-indicator {
    bottom: 1.5rem;
  }

  body.page-home .hero.hero-fullscreen {
    padding-bottom: calc(3.5rem + 48px);
  }

  /* Beats */
  .beats-section {
    gap: 1.5rem;
  }

  .beats-filter-toggle {
    display: flex;
    margin-bottom: 1rem;
    width: 100%;
  }

  .beats-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 1100;
    flex: none;
    border-radius: 0;
    transition: right 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .beats-sidebar.open {
    right: 0;
  }

  .beats-filter-close {
    display: flex;
  }

  .beats-main {
    flex: 1 1 100%;
    min-width: 0;
  }

  .beats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .beats-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
  }

  .beats-sidebar-overlay.visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .beat-card {
    padding: 1rem;
  }

  .beat-visual {
    margin: -1rem -1rem 0.75rem -1rem;
  }

  .beat-name {
    font-size: 1.25rem;
  }

  /* Layout stacks */
  .license-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .license-cards .license-card {
    max-width: none;
  }

  #licenses {
    padding-top: 5rem;
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }

  #licenses .license-cards {
    gap: 1.5rem;
  }

  #licenses .license-card {
    min-height: 0;
    padding: 1.65rem 1.35rem;
  }

  #licenses .license-popular-strip {
    margin: -1.65rem -1.35rem 0.75rem -1.35rem;
  }

  #licenses .section-heading {
    margin-bottom: 1.35rem;
  }

  .licenses-lead {
    margin-bottom: 2rem;
  }

  .licenses-page-note {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .credits-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .step {
    gap: 1rem;
  }

  .step-num {
    font-size: 2rem;
  }

  .cta-banner {
    padding: 2rem 1.25rem;
    margin-top: 3rem;
  }

  .email-signup-section {
    padding: 2.65rem 1.15rem;
  }

  .email-signup-row {
    flex-direction: column;
  }

  .email-signup-input {
    min-width: 100%;
    width: 100%;
  }

  .email-signup-btn {
    width: 100%;
  }

  .contact-wrapper,
  .contact-details {
    max-width: 100%;
  }

  /* Nav mobile menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(85%, 280px);
    z-index: 1002;
    height: 100vh;
    height: 100dvh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: calc(5rem + env(safe-area-inset-top, 0px)) 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    color: var(--text-body);
    padding: 0.75rem 0;
    font-size: 0.95rem;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--text);
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
    position: relative;
    z-index: 1003;
  }

  /* Footer */
  footer {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .footer-meta {
    align-items: center;
  }

  .marquee-item {
    padding: 0 1.25rem;
    font-size: 0.85rem;
  }
}

/* Large phone: 480px */
@media (max-width: 480px) {
  nav {
    padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.75rem 0.65rem;
  }

  nav .logo {
    font-size: 1.35rem;
  }

  .logo-img {
    height: 28px;
  }

  section {
    padding: 3.75rem 1rem 2.25rem;
  }

  .section-heading {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hero-headline {
    font-size: clamp(1.6rem, 9vw, 2.5rem);
  }

  .hero-cta {
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .hero-content {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .beat-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .beat-controls .btn-gold {
    width: 100%;
    flex: none;
  }

  .beats-section {
    gap: 1.25rem;
  }

  .beats-sidebar {
    width: 100%;
    max-width: none;
    border-radius: 0;
  }

  .beat-card {
    padding: 0.875rem;
  }

  .beat-visual {
    margin: -0.875rem -0.875rem 0.625rem -0.875rem;
  }

  .beat-controls {
    gap: 0.75rem;
  }

  .beat-card .btn-gold {
    padding: 0.65rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.875rem 1rem;
  }

  .custom-select-trigger {
    padding: 0.875rem 1rem;
  }

  .sound-card,
  .license-card {
    padding: 1.25rem;
  }

  .license-card-popular .license-popular-strip {
    margin: -1.25rem -1.25rem 0.65rem -1.25rem;
  }

  .cta-banner {
    padding: 1.5rem 1rem;
  }

  footer {
    padding: 1.25rem 0.75rem;
  }
}

/* Small phone: 320px */
@media (max-width: 320px) {
  nav {
    padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 0.5rem 0.5rem;
  }

  nav .logo {
    font-size: 1.25rem;
  }

  section {
    padding: 3.5rem 0.75rem 1.75rem;
  }

  .section-heading {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .hero-subheadline {
    font-size: 0.85rem;
  }

  .beat-card {
    padding: 0.75rem;
  }

  .beat-visual {
    margin: -0.75rem -0.75rem 0.5rem -0.75rem;
  }

  .beat-name {
    font-size: 1.1rem;
  }

  .beat-info {
    font-size: 0.75rem;
  }

  .waveform {
    height: 28px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  footer {
    padding: 1rem 0.5rem;
    gap: 0.75rem;
  }

  .social-links {
    gap: 1rem;
  }

  .social-links svg {
    width: 28px;
    height: 28px;
  }

  .social-links .soundcloud-icon-img,
  .social-links .instagram-icon-img,
  .social-links .apple-music-icon-img,
  .social-links .spotify-icon-img {
    width: 28px;
    height: 28px;
  }

  footer .social-links .instagram-icon-img {
    width: calc(28px * 1.05 * 1.05);
    height: calc(28px * 1.05 * 1.05);
  }
}

/* Prevent horizontal scroll from wide content */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* ===== Settings ===== */
.settings-toggle {
  position: relative;
  z-index: 1001;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  flex-shrink: 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.settings-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

.settings-toggle:hover {
  color: var(--text);
}

/* License tier info (licenses.html — mirrors settings overlay) */
.license-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 2001;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}

.license-info-overlay.open {
  display: flex;
}

.license-info-modal {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2.25rem 2rem;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.license-info-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: var(--text);
  margin: 0 0 1.25rem;
  padding-right: 2rem;
}

.license-info-body {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.65;
}

.license-info-body p {
  margin: 0 0 1rem;
}

.license-info-body p strong {
  color: var(--text);
  font-weight: 600;
}

.license-info-body ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.license-info-body li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-size: 0.88rem;
}

.license-info-body li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.license-info-actions {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
}

.license-info-actions .btn {
  width: 100%;
  text-align: center;
  border: none;
}

/* Terms & Conditions (footer — centered modal) */
.terms-overlay {
  position: fixed;
  inset: 0;
  z-index: 2002;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}

.terms-overlay.open {
  display: flex;
  overscroll-behavior: none;
}

.terms-overlay .license-info-modal {
  overscroll-behavior: contain;
}

.terms-modal {
  width: min(640px, calc(100vw - 2rem));
}

.terms-legal .terms-intro {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.terms-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.terms-section-title:first-of-type {
  margin-top: 0;
}

.terms-legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-legal a:hover {
  color: var(--accent-hover);
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}

.settings-overlay.open {
  display: flex;
}

.settings-modal {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: min(340px, 100%);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s;
}

.settings-close:hover {
  color: var(--text);
}

.settings-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  color: var(--text);
  margin: 0;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

.settings-accents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.accent-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.accent-swatch:hover {
  transform: scale(1.15);
}

.accent-swatch.active {
  border-color: var(--text);
}

.settings-theme-toggle {
  display: flex;
}

.settings-theme-btn {
  padding: 0.5rem 1.25rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.settings-theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.settings-theme-btn.active-mode {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.settings-volume-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-volume-range {
  flex: 1;
  min-width: 0;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
}

.settings-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--text);
  margin-top: -5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.settings-volume-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.settings-volume-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.settings-volume-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.settings-volume-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-body);
  min-width: 2.5rem;
  text-align: right;
}

body.light-mode .settings-volume-range,
html.saint-light-early .settings-volume-range {
  background: rgba(0, 0, 0, 0.08);
}

body.light-mode .settings-volume-range::-webkit-slider-runnable-track,
html.saint-light-early .settings-volume-range::-webkit-slider-runnable-track {
  background: rgba(0, 0, 0, 0.08);
}

body.light-mode .settings-volume-range::-moz-range-track,
html.saint-light-early .settings-volume-range::-moz-range-track {
  background: rgba(0, 0, 0, 0.08);
}

/* ===== Light Mode ===== */
body.light-mode,
html.saint-light-early {
  --bg: #f5f5f5;
  --bg-elevated: #ebebeb;
  --bg-card: #ffffff;
  --text: #0a0a0a;
  --text-body: #444444;
  --muted: rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

body.light-mode nav.scrolled,
html.saint-light-early nav.scrolled {
  background: rgba(245, 245, 245, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .hero-bg,
html.saint-light-early .hero-bg {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e4f0 40%, #ede8f5 100%);
}

body.light-mode .hero-bg::before,
html.saint-light-early .hero-bg::before {
  background: radial-gradient(
    ellipse 115% 75% at 50% 44%,
    color-mix(in srgb, var(--accent) 10%, var(--bg)) 0%,
    color-mix(in srgb, var(--accent) 5%, var(--bg)) 18%,
    color-mix(in srgb, var(--accent) 2%, var(--bg)) 36%,
    var(--bg) 62%,
    var(--bg) 100%
  );
}

body.light-mode .hero-bg::after,
html.saint-light-early .hero-bg::after {
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 0) 0%,
    rgba(245, 245, 245, 0) 42%,
    rgba(237, 235, 244, 0.35) 82%,
    rgba(228, 224, 236, 0.55) 100%
  );
}

body.light-mode.page-home .home-stats-section,
html.saint-light-early body.page-home .home-stats-section {
  border-top-color: rgba(0, 0, 0, 0.08);
  background: var(--bg);
}

body.light-mode .nav-links,
html.saint-light-early .nav-links {
  background: rgba(245, 245, 245, 0.98);
}

body.light-mode footer,
html.saint-light-early footer {
  border-top-color: rgba(0,0,0,0.1);
}

body.light-mode .licenses-page-note,
html.saint-light-early .licenses-page-note {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* ===== Custom Cursor ===== */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
  opacity: 0;
  box-shadow: none;
}

.cursor-dot.visible {
  opacity: 1;
}

.cursor-dot.hovering {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1.5px solid var(--accent);
  box-shadow:
    0 0 6px var(--accent-glow),
    0 0 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

@media (pointer: coarse) {
  .cursor-dot { display: none; }
  *, *::before, *::after { cursor: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-dot { transition: none; }
}

/* Performance: reduce animations on low-powered devices */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation-duration: 60s;
  }
}
