:root {
  --bg: radial-gradient(circle at 20% 20%, #111 0%, #000 100%);
  --panel: #111;
  --muted: #8b8fa3;
  --text: #e7eaf3;
  --accent: #7aa2f7;
  --green: #7ee787;
  --red: #ff6b6b;
  --border: #232737;
  --shadow: rgba(0,0,0,0.4);
}

/* ====== GLOBAL RESET / BASE ====== */
* { box-sizing: border-box; }

body.dark { 
  margin: 0;
  background: radial-gradient(circle at 20% 20%, #111 0%, #000 100%);
  color: #f3f3f3;
  font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Make sure body is NOT flex – header should sit on top, content below */
body.dark {
  display: block;
}

/* ====== TOP BAR / HEADER ====== */
.topbar,
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}

.brand { font-weight: 700; letter-spacing: .3px; }
.topnav .btn.small { padding: 4px 10px; }

/* Site header with logo + nav */
.site-header {
  background: #0d1117;
  border-bottom: 1px solid #21262d;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 38px;
  width: auto;
  filter: brightness(1.2);
  transition: transform 0.2s ease;
}
.logo-img:hover { transform: scale(1.05); }

.nav-links a {
  color: #c9d1d9;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #58a6ff; }

/* ====== PAGE LAYOUT ====== */

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 6px 16px var(--shadow);
  margin-bottom: 18px;
}

h1 { margin: 0 0 16px; font-size: 22px; }
h2 { margin: 6px 0 12px; font-size: 18px; }
h3 { margin: 0 0 12px; font-size: 16px; }

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active {
  color: var(--text);
  border-color: var(--accent);
}

.tab-actions { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.tab-actions > div.hidden { display:none; }

.tabpane { display:none; }
.tabpane.active { display:block; }

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}
.table td.actions { white-space: nowrap; }

/* Wrap tables on mobile */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Buttons */
.btn { 
  background: #326792; /*linear-gradient(90deg, #5d3df5, #9f58ff);*/
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 1rem;
  transition: opacity 0.2s ease;
  font-size: 0.9rem;
}
.btn.small { padding: 4px 8px; font-size: 12px; margin-top: 0; }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
.btn.danger { background: var(--red); }
.btn:hover { opacity: 0.9; }

/* Inputs */
.input {
  background: rgba(0,0,0,0.4);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.6rem;
  border-radius: 10px;
  width: 100%;
}

input {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s ease;
}
input:focus { border-color: #326792; }

/* Flash messages */
#flash-area {
  position: fixed;
  top: 56px;
  right: 16px;
  display: grid;
  gap: 10px;
  z-index: 999;
}
.flash {
  padding: 10px 12px;
  border-radius: 8px;
  background: #131722;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px var(--shadow);
}
.flash.success { border-color: var(--green); }
.flash.error   { border-color: var(--red); }

/* ====== MODALS ====== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 96vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px; /* header/body/footer handle padding */
  box-shadow: 0 10px 30px var(--shadow);
  max-height: 88vh;          /* 🔹 constrain modal height to viewport */
  /* NEW: make modal a flex column and clip inside, not the viewport */
  display: flex;
  flex-direction: column;
  overflow-y: auto;          /* 🔹 THIS makes the modal scrollable */
  z-index: 1001;
}

.hidden { display: none; }

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #050812;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;           /* <-- NEW */
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0;
}

.btn-close {
  background: none;
  border: var(--border);
  color: #aaa;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.btn-close:hover { color: #fff; }

/* Modal body */
.modal-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

  /* NEW: this is the scrollable area */
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-body.grid-2 .full-width {
  grid-column: 1 / -1;
}

/* Modal footer */
.modal-footer {
  background: #050812;
  padding: 16px 20px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;           /* <-- NEW */
}

body.modal-open {
  overflow: hidden;
}


/* Form groups in modals */
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #bbb;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #eee;
  padding: 0.6rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #326792;
}

/* Password field with toggle */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field .input {
  width: 100%;
  padding-right: 2rem;
}
.password-field .toggle-pass {
  position: absolute;
  right: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.password-field .toggle-pass:hover {
  opacity: 1;
}

/* Modal table scroll */
.modal-content .table-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
}
.modal-content .table th,
.modal-content .table td {
  padding: 0.4rem 0.6rem;
}

#modal-host .modal-content form label {
  display: block;
  margin-bottom: 0.8rem;
}
#modal-host .modal-content input.input {
  width: 100%;
  margin-top: 0.3rem;
}
#modal-host .modal-content {
  max-width: 400px;
  margin: auto;
}

/* ====== UPLOAD / ICONS ====== */

.dropzone {
  border: 2px dashed #bbb;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.dropzone.dragover {
  background: #eef6ff;
  border-color: #3399ff;
}
.dropzone img {
  margin-top: 0.5rem;
  max-width: 100px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.product-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  vertical-align: middle;
}
.product-preview {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 8px;
}

.product-icon-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #2c2c2c;
  padding: 4px;
}

/* Upload buttons */
.upload-label {
  display: inline-block;
  background: #333;
  color: #bbb;
  padding: 6px 10px;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.upload-label:hover {
  background: #ff20435f;
  color: #fff;
}

/* Progress bar */
.upload-progress { margin-top: 10px; }
.progress-bar {
  height: 6px;
  background: #ff20435f;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-text {
  font-size: 0.8rem;
  text-align: right;
  color: #aaa;
  margin-top: 4px;
}

/* ====== SORTING ====== */

.inline { display:inline; }
.muted { color: var(--muted); }

th[data-sort] {
  cursor: pointer;
  user-select: none;
}
th[data-sort]:after {
  content: '⇅';
  font-size: 0.8em;
  opacity: 0.3;
  margin-left: 4px;
  transition: transform 0.15s ease;
}
th[data-sort].sorted-asc:after {
  content: '↑';
  opacity: 0.8;
}
th[data-sort].sorted-desc:after {
  content: '↓';
  opacity: 0.8;
}
th.sorted-asc:after { transform: rotate(0deg); }
th.sorted-desc:after { transform: rotate(180deg); }

/* ====== BADGES & STATUS ====== */

.badge {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok   { background:#1f6feb; color:#fff; }
.badge-info { background:#3fb950; color:#0d1117; }
.badge-warn { background:#bb8009; color:#0d1117; }

.product-detail-panel { margin-top: 1rem; }

.product-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-title { margin: 0; }
.product-description {
  white-space: pre-wrap;
  line-height: 1.5;
}

.product-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.product-icon-large {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
}

/* Expired / expiring rows */
tr.expired {
  background-color: rgba(255, 100, 100, 0.15);
  color: #c0392b;
}
tr.expiring {
  background-color: rgba(255, 165, 0, 0.12);
  color: #e67e22;
}
tr.expired:hover,
tr.expiring:hover {
  background-color: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

/* Flex helpers */
.flex-row { display:flex; }
.flex-col { display:flex; flex-direction:column; }
.flex-1 { flex:1; }
.align-center { align-items:center; }
.align-start { align-items:flex-start; }
.space-between { justify-content:space-between; }
.gap-8 { gap:0.5rem; }
.gap-16 { gap:1rem; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.product-name-text { font-weight: 500; }
.truncate {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== AUTH / LOGIN LAYOUT (ONLY LOGIN PAGE USES THIS) ====== */

.auth-layout {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  height: 56px;
  width: auto;
  filter: brightness(1.3);
}

/* ====== RESPONSIVE TWEAKS ====== */

@media (max-width: 900px) {
  .container {
    max-width: 100%;
    margin: 16px auto;
    padding: 0 12px;
  }

  .modal {
    top: 72px; /* 👈 ~header height + a bit of spacing */
    left: 50%;
    transform: translateX(-50%);
    width: 96vw;
    max-height: calc(100vh - 88px); /* 100vh minus header+margin */
    padding: 12px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 6px;
    font-size: 12px;
  }

  .nav-links a {
    margin-left: 12px;
    font-size: 13px;
  }

  .tabs {
    gap: 4px;
  }
  .tab {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }

  #flash-area {
    top: 52px;
    right: 8px;
    left: 8px;
  }
}

@media (max-width: 480px) {
  .site-header,
  .topbar {
    padding: 10px 10px;
  }

  .logo-img {
    height: 32px;
  }

  .nav-links {
    font-size: 12px;
  }

  .card {
    padding: 12px;
  }

  .auth-card {
    max-width: 360px;
  }
}

/* Login */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;     /* centers horizontally */
    justify-content: center;
    min-height: 100vh;       /* vertically centers on screen */
}
body {
  background: radial-gradient(circle at 20% 20%, #111 0%, #000 100%);
  color: #f3f3f3;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}
.login-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
}
label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #bbb;
}
.extra {
  text-align: center;
  margin-top: 1rem;
}
.extra a {
  color: #326792;
  text-decoration: none;
}
.extra a:hover {
  text-decoration: underline;
}

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 40px);
  padding: 16px;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

p {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 2rem;
}

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #666;
}


/* new landing desing */
/* ====== PUBLIC LANDING V2 – CLEAN, EDITORIAL ====== */

/* Make sure the landing body is *not* the flex-centered login body */
body.sl-body {
  margin: 0;
  min-height: 100vh;
  display: block;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

/* Header */

.sl-topbar--public {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 7, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.sl-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sl-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.sl-nav-link {
  font-size: 13px;
  text-decoration: none;
  color: #a1a6b7;
}

.sl-nav-link:hover {
  color: #ffffff;
}

.sl-topbar-actions .btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Keep dashboard .btn style, just soften shape on landing */
body.sl-body .btn {
  border-radius: 999px;
}

/* Main layout */

.sl-main {
  padding-bottom: 64px;
}

.sl-hero {
  padding: 56px 16px 40px;
}

.sl-hero-inner--simple {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.sl-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sl-hero-copy h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
}

.sl-hero-lead {
  font-size: 14px;
  line-height: 1.7;
  color: #c4c7d3;
  margin: 0 0 16px;
}

.sl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.sl-hero-meta-line {
  font-size: 13px;
  color: #a3a7b8;
}

/* Hero visual – minimal, abstract instrument representation */

.sl-hero-visual--simple {
  display: flex;
  justify-content: center;
}

.sl-hero-instrument {
  padding: 18px 18px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 10% 0%, rgba(159,88,255,0.2), rgba(3,5,15,0.95));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-width: 320px;
  text-align: center;
}

.sl-hero-instrument-orbit {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
}

.sl-hero-instrument-core {
  position: absolute;
  inset: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #326792);
  box-shadow: 0 0 24px rgba(159, 88, 255, 0.9);
}

.sl-hero-instrument-ring {
  position: absolute;
  inset: 50%;
  border-radius: 999px;
  border: 1px solid rgba(210, 219, 255, 0.35);
  transform: translate(-50%, -50%);
}

.sl-hero-instrument-ring--inner {
  width: 110px;
  height: 110px;
}

.sl-hero-instrument-ring--outer {
  width: 150px;
  height: 150px;
  opacity: 0.6;
}

.sl-hero-instrument-caption {
  font-size: 11px;
  color: #cdd1e0;
}

/* Sections */

.sl-section {
  padding: 32px 16px;
  border-top: 1px solid rgba(35, 39, 55, 0.7);
}

.sl-section:first-of-type {
  border-top: none;
}

.sl-section--narrow .sl-section-inner {
  max-width: 760px;
}

.sl-section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.sl-section h2 {
  font-size: 22px;
  margin: 0 0 10px;
}

.sl-section p {
  font-size: 14px;
  color: #c4c7d3;
}

/* Instrument layout */

.sl-instrument-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.sl-instrument-grid h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.sl-instrument-grid p {
  font-size: 13px;
}

/* Sound section – linear rows, no cards */

.sl-sound-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sl-sound-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 39, 55, 0.7);
}

.sl-sound-row:first-child {
  border-top: none;
  padding-top: 0;
}

.sl-sound-row h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.sl-sound-row p {
  font-size: 13px;
  color: #c4c7d3;
}

.sl-sound-audio {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sl-sound-audio audio {
  width: 100%;
  display: block;
  background: transparent;
}

.sl-media-note {
  font-size: 11px;
  color: #8b8fa3;
}

.sl-sound-row--video .sl-video-shell {
  border-radius: 16px;
  border: 1px dashed rgba(139, 143, 163, 0.7);
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #c4c7d3;
}

/* Creators section */

.sl-creators-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.sl-creators-block h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.sl-creators-block p {
  font-size: 13px;
}

/* Stay in orbit */

.sl-stay-form {
  margin-top: 16px;
  max-width: 480px;
}

/* Footer */

.sl-footer {
  border-top: 1px solid var(--border);
  padding: 16px 16px 24px;
  background: rgba(5, 7, 12, 0.9);
}

.sl-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.sl-footer-links {
  display: flex;
  gap: 12px;
}

.sl-footer-links a {
  color: #a1a6b7;
  text-decoration: none;
  font-size: 12px;
}

.sl-footer-links a:hover {
  color: #ffffff;
}

/* Responsive */

@media (max-width: 900px) {
  .sl-hero-inner--simple {
    grid-template-columns: minmax(0, 1fr);
  }
  .sl-hero-visual--simple {
    order: -1;
    margin-bottom: 20px;
  }
  .sl-instrument-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sl-sound-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .sl-creators-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sl-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .sl-topbar-inner {
    padding-inline: 12px;
  }
  .sl-section,
  .sl-hero {
    padding-inline: 12px;
  }
}

/* === UNIFY SECTION WIDTH TO MATCH HERO (960px) === */

.sl-section-inner,
.sl-section--narrow .sl-section-inner {
  max-width: 960px !important;   /* Match .sl-hero-inner width */
  margin: 0 auto;
  width: 100%;
}


/* Improve line length (measure) for readability */
.sl-section-inner p,
.sl-section-inner h2,
.sl-section-inner h3 {
  max-width: 780px;   /* prevents overly long line lengths */
}

/* === VERTICAL RHYTHM TUNING === */

/* Unify widths (hero + sections) and keep text at a comfortable measure */
.sl-section-inner,
.sl-section--narrow .sl-section-inner,
.sl-hero-inner--simple {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.sl-section-inner p,
.sl-section-inner h2,
.sl-section-inner h3,
.sl-section-inner h4 {
  max-width: 780px;
}

/* Adjust vertical spacing per section */
.sl-hero {
  padding: 64px 16px 48px;
}

.sl-section {
  padding: 40px 16px;
}

.sl-section--narrow .sl-section-inner {
  /* same width as hero now, but still slightly “tighter” vertically */
}

.sl-section h2 {
  margin: 0 0 12px;
}

.sl-section p + p {
  margin-top: 8px;
}

/* Instrument + creators grids: slightly looser, more “spread” */
.sl-instrument-grid {
  margin-top: 20px;
  gap: 24px;
}

.sl-creators-grid {
  margin-top: 20px;
  gap: 24px;
}

/* Sound list: gentle separators, not heavy lines */
.sl-sound-list {
  margin-top: 20px;
  gap: 24px;
}

.sl-sound-row {
  padding-top: 14px;
  padding-bottom: 6px;
  border-top: 1px solid rgba(35, 39, 55, 0.5);
}

.sl-sound-row:first-child {
  border-top: none;
  padding-top: 0;
}

/* Stay-in-orbit form spacing */
.sl-stay-form {
  margin-top: 20px;
}

/* === HERO MOTION / ORBIT ANIMATION === */

@keyframes sl-orbit-inner {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes sl-orbit-outer {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes sl-core-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);     box-shadow: 0 0 24px rgba(159, 88, 255, 0.7); }
  50%  { transform: translate(-50%, -50%) scale(1.04);  box-shadow: 0 0 30px rgba(159, 88, 255, 0.9); }
  100% { transform: translate(-50%, -50%) scale(1);     box-shadow: 0 0 24px rgba(159, 88, 255, 0.7); }
}

/* Apply to rings + core in a very gentle way */
.sl-hero-instrument-core {
  animation: sl-core-pulse 7s ease-in-out infinite;
}

.sl-hero-instrument-ring--inner {
  animation: sl-orbit-inner 32s linear infinite;
}

.sl-hero-instrument-ring--outer {
  animation: sl-orbit-outer 48s linear infinite;
  opacity: 0.5;
}

/* Slight hover lift on the whole hero instrument */
.sl-hero-instrument {
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.sl-hero-instrument:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
}

/* === AUDIO STRIP AESTHETIC (PLACEHOLDER WAVEFORMS) === */

.sl-sound-audio {
  position: relative;
  padding-top: 10px;
}

.sl-sound-audio::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 32px;
  border-radius: 999px;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(159, 88, 255, 0.18),
      rgba(159, 88, 255, 0.18) 6px,
      transparent 6px,
      transparent 12px
    );
  background-size: 100% 100%;
  opacity: 0.45;
  pointer-events: none;
}

/* keep the audio controls sitting nicely “on” the strip */
.sl-sound-audio audio {
  position: relative;
  margin-top: 4px;
}

/* For narrower screens, keep it tidy */
@media (max-width: 900px) {
  .sl-sound-audio::before {
    height: 28px;
  }
}

/* Softer separators overall */
.sl-section {
  border-top: 1px solid rgba(35, 39, 55, 0.45);
}

.sl-footer {
  margin-top: 24px;
}

/* Kill older waveform background under audio */
.sl-sound-audio::before {
  display: none !important;
}

/* Wrapper: just a simple vertical stack now */
.sl-sound-audio {
  position: relative;
  margin-top: 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Pill lives directly on the audio element */
.sl-sound-audio audio {
  width: 100%;
  display: block;
  background: var(--panel);
  outline: none;
  border-radius: 999px;
  padding: 4px 6px;
  border: 1px solid rgba(35, 39, 55, 0.95);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.sl-sound-audio audio::-webkit-media-controls-enclosure {
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
}

.sl-sound-audio audio::-webkit-media-controls-panel {
  background: transparent;
  border-radius: 999px;
}

/* Play/Pause button: light icon on dark */
.sl-sound-audio audio::-webkit-media-controls-play-button {
  filter: invert(0.85);
  opacity: 0.9;
}

/* Time / progress bar */
.sl-sound-audio audio::-webkit-media-controls-timeline {
  border-radius: 999px;
  background: transparent;
}

.sl-sound-audio audio::-webkit-media-controls-current-time-display,
.sl-sound-audio audio::-webkit-media-controls-time-remaining-display {
  color: #e5e7eb;
  font-size: 11px;
}

/* Volume + other controls: slightly dimmer */
.sl-sound-audio audio::-webkit-media-controls-mute-button,
.sl-sound-audio audio::-webkit-media-controls-volume-slider,
.sl-sound-audio audio::-webkit-media-controls-fullscreen-button {
  filter: invert(0.8);
  opacity: 0.8;
}

.sl-media-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #8b8fa3;
}

/* === HERO BACKGROUND IMAGE + PARALLAX === */

.sl-hero--with-bg {
  position: relative;
  /* allow the background to extend below so we can fade it out smoothly */
  overflow: visible;
}

/* The image layer: taller than the hero so we can scroll through it */
.sl-hero-bg {
  position: absolute;
  top: -20vh;      /* start a bit above the hero */
  left: 0;
  right: 0;
  height: 160vh;   /* taller than the viewport/hero */
  background-image: url("/static/img/hero-spatial.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.45;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
  z-index: 0;

  /* NEW: fade the image to transparent toward the bottom so it
     doesn’t bleed visually into later sections */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,    /* fully visible at the top */
    rgba(0, 0, 0, 1) 40%,   /* still fully visible mid-hero */
    rgba(0, 0, 0, 0) 60%,   /* fully transparent at the bottom */
    rgba(0, 0, 0, 0) 100%   /* fully transparent at the bottom */
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0) 60%,   /* fully transparent at the bottom */
    rgba(0, 0, 0, 0) 100%
  );
}


.sl-hero-inner--simple {
  position: relative;
  z-index: 2;
}


.sl-section {
  border-top: 1px solid rgba(35, 39, 55, 0.45);
}


/* === BLUR THE REAL HERO BACKGROUND INTO THE INSTRUMENT SECTION === */

/* Instrument section directly after the hero */
#instrument {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(35, 39, 55, 0.45);        /* no hard line directly under the hero */
  background: transparent; /* let whatever is behind show through */
}

/* This overlay sits at the top of the instrument section and blurs
   WHAT'S BEHIND IT (the hero background), not a new copy of the image. */
#instrument::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;              /* overlap a bit into the hero area */
  height: 300px;           /* how tall the blur band is */
  z-index: 0;
  pointer-events: none;

  /* Very slight tint so backdrop-filter actually has a surface */
  background: rgba(3, 5, 15, 0.05);

  /* Blur the real hero background behind this overlay */
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  /* Optional: ease the blur in as you go down the section */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 0%,
    rgba(0,0,0,0.4) 35%,
    rgba(0,0,0,1.0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 0%,
    rgba(0,0,0,0.4) 35%,
    rgba(0,0,0,1.0) 100%
  );
}

/* Make sure the actual content of #instrument sits above the blur overlay */
#instrument > * {
  position: relative;
  z-index: 1;
}



/* Fix layout for landing page */
body.sl-body {
  display: block;
  align-items: initial;
  justify-content: initial;
  height: auto;
  margin: 0;
}

/* === MINIMAL LANDING: fix layout + tall hero === */

html,
body.sl-body.sl-landing-simple {
  height: 100%;
}

body.sl-body.sl-landing-simple {
  display: flex;
  flex-direction: column;
}

/* main region should expand */
body.sl-body.sl-landing-simple .sl-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* footer stays at the bottom */
body.sl-body.sl-landing-simple .sl-footer {
  margin-top: 0;
  flex-shrink: 0;
}

/* Make the hero tall enough to fill most of the screen */
body.sl-body.sl-landing-simple .sl-hero {
  min-height: 85vh;     /* increase if you want more background */
  display: flex;
  align-items: center;
  padding: 0;
}

/* Tame hero background for this simple page */
body.sl-body.sl-landing-simple .sl-hero--with-bg {
  overflow: hidden;
}

body.sl-body.sl-landing-simple .sl-hero-bg {
  top: -12vh;
  height: 150vh;
  opacity: 0.48;
}


