/* Stockwaves storefront. Brand: charcoal + Stockwaves cyan, from the album covers. */
:root {
  --bg: #1c1e21;
  --bg-2: #24272b;
  --panel: #2a2d32;
  --panel-2: #32363c;
  --line: #3a3f46;
  --text: #e8edf0;
  --muted: #9aa5ad;
  --cyan: #4fbcd8;
  --cyan-2: #c4f0fb;
  --cyan-dark: #2c8fab;
  --hot: #f2b84b;
  --wave: #4a5058;
  --wave-hover: #6c8a95;
  --wave-played: #4fbcd8;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.has-player { padding-bottom: 88px; }
a { color: var(--cyan); }
a:hover { color: var(--cyan-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.eyebrow { font: 400 .8rem/1 Jost, Inter, sans-serif; letter-spacing: .34em; text-transform: uppercase; color: var(--cyan); margin: 0 0 1rem; }
.accent { color: var(--cyan); }

/* ---------- header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(28, 30, 33, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 1.05rem Jost, sans-serif; letter-spacing: .42em; color: #a3e0ee; }
.brand:hover { color: var(--cyan-2); }
.main-nav { margin-left: auto; display: flex; gap: 22px; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--text); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0 40px; color: var(--muted); font-size: .88rem; }
.foot-brand { display: flex; align-items: center; gap: 8px; font: 400 .9rem Jost, sans-serif; letter-spacing: .4em; color: #a3e0ee; margin-bottom: 10px; }

/* ---------- buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: .62em 1.15em; border-radius: 999px; font: 600 .92rem Inter, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--cyan); color: var(--text); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: #0e2a33; }
.btn-primary:hover { background: var(--cyan-2); border-color: var(--cyan-2); color: #0e2a33; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .42em .9em; font-size: .84rem; }
.btn-block { width: 100%; padding: .85em; font-size: 1rem; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.3rem; line-height: 1; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.icon-btn svg, .play-btn svg { width: 20px; height: 20px; fill: currentColor; }
.link-btn { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--cyan); text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg-2); color: var(--text); border-radius: 999px; padding: .3em .85em; font: 500 .84rem Inter, sans-serif; cursor: pointer; }
#f-mood .chip { text-transform: capitalize; }
.chip:hover { border-color: var(--cyan); }
.chip.on { background: var(--cyan); border-color: var(--cyan); color: #0e2a33; }
.chip-ghost { background: transparent; text-transform: none; }
.pill { border: 0; background: var(--panel-2); color: var(--text); border-radius: 999px; padding: .3em .8em; font: 500 .84rem Inter, sans-serif; cursor: pointer; }
.pill:hover { background: var(--line); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- hero */
.hero { padding: 64px 0 36px; background:
  radial-gradient(900px 340px at 85% -10%, rgba(79, 188, 216, .22), transparent 70%),
  radial-gradient(700px 300px at 0% 120%, rgba(79, 188, 216, .10), transparent 70%); }
.lede { max-width: 640px; color: var(--muted); font-size: 1.08rem; margin: 0 0 28px; }
.search { position: relative; max-width: 720px; }
.search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 56px; padding: 0 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 500 1.02rem Inter, sans-serif; box-shadow: var(--shadow); }
.search input:focus { outline: none; border-color: var(--cyan); }
.search input::-webkit-search-cancel-button { display: none; }
.search .icon-btn { position: absolute; right: 10px; top: 11px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.quick-label { color: var(--muted); font-size: .86rem; margin-right: 4px; }

/* ---------- collections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 32px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.count { color: var(--muted); font-weight: 500; font-size: .95rem; margin-left: 6px; }
.collections { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.collection { border: 1px solid transparent; background: none; color: var(--text); padding: 0; text-align: left; cursor: pointer; border-radius: var(--radius); }
.collection img { width: 132px; height: 132px; border-radius: 10px; display: block; object-fit: cover; transition: transform .15s; }
.collection:hover img { transform: translateY(-2px); }
.collection.on img { outline: 3px solid var(--cyan); outline-offset: 2px; }
.col-name { display: block; font-weight: 600; margin-top: 8px; font-size: .9rem; }
.col-n { display: block; color: var(--muted); font-size: .8rem; }

/* ---------- filters */
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .45em .6em; font: inherit; }
.filters { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; margin-bottom: 10px; }
.filter-group { display: flex; gap: 10px; align-items: flex-start; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.fg-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; width: 64px; flex: none; padding-top: .45em; }
.filter-row .fg-label { width: auto; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.active-filters:empty { display: none; }
.active-filters .link-btn { color: var(--cyan); font-size: .86rem; }

/* ---------- track list */
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: grid; grid-template-columns: 44px 48px minmax(180px, 1.15fr) minmax(160px, 1.6fr) 74px auto; grid-template-areas: "play cover info wave meta actions" "details details details details details details"; align-items: center; gap: 4px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.track:hover { background: var(--bg-2); }
.track.current { background: var(--panel); }
.track.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 2px var(--cyan); } to { box-shadow: 0 0 0 2px transparent; } }
.play-btn { grid-area: play; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.play-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.play-btn .i-pause, .playing .play-btn .i-play, .is-playing #p-play .i-play { display: none; }
.playing .play-btn .i-pause, .is-playing #p-play .i-pause { display: block; }
.playing .play-btn, .play-btn.big { background: var(--cyan); border-color: var(--cyan); color: #0e2a33; }
.cover { grid-area: cover; width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.info { grid-area: info; min-width: 0; }
.title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.title { border: 0; background: none; color: var(--text); font: 600 1rem Inter, sans-serif; padding: 0; cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title:hover { color: var(--cyan); }
.badge { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .15em .5em; border-radius: 4px; background: var(--panel-2); color: var(--cyan-2); }
.badge-hot { color: #2b1d00; background: var(--hot); }
.sub { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; max-height: 24px; overflow: hidden; }
.tags.all { max-height: none; margin: 8px 0 12px; }
.tag { border: 0; background: var(--bg-2); color: var(--muted); border-radius: 4px; padding: .1em .5em; font: 500 .75rem Inter, sans-serif; cursor: pointer; }
.track:hover .tag, .details .tag { background: var(--panel-2); }
.tag:hover { color: var(--cyan-2); }
.wave { grid-area: wave; width: 100%; height: 44px; cursor: pointer; display: block; }
.meta { grid-area: meta; display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.dur { font-weight: 600; }
.bpm { color: var(--muted); font-size: .78rem; }
.actions { grid-area: actions; display: flex; align-items: center; gap: 2px; }
.actions .license { margin-left: 6px; }
.track.open [aria-expanded="true"] svg { transform: rotate(180deg); }
.details { grid-area: details; padding: 10px 0 6px 106px; max-width: 900px; }
.desc { margin: 0; color: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; margin: 0 0 12px; font-size: .88rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.more-wrap { text-align: center; margin: 22px 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- how / faq */
.how { margin-top: 56px; padding: 48px 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 18px; }
.step { background: var(--panel); border-radius: var(--radius); padding: 22px; }
.step p { color: var(--muted); margin: 0; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cyan); color: #0e2a33; font-weight: 700; margin-bottom: 12px; }
.faq { margin-top: 48px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* ---------- player */
.player { position: fixed; inset: auto 0 0 0; z-index: 30; background: rgba(36, 39, 43, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .3); }
.player-row { display: flex; align-items: center; gap: 10px; height: 76px; }
.play-btn.big { width: 46px; height: 46px; }
.p-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.p-meta { display: grid; min-width: 0; width: 210px; flex: none; }
.p-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta span { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; width: 38px; text-align: center; flex: none; }
.p-wave { flex: 1; min-width: 80px; height: 46px; cursor: pointer; }
.p-vol { width: 90px; accent-color: var(--cyan); }

/* ---------- licence dialog */
.modal { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; width: min(460px, 100% - 32px); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
.modal-body { padding: 28px; position: relative; }
.modal-close { position: absolute; right: 12px; top: 12px; }
.ticks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--cyan); font-weight: 700; margin-right: 10px; }
.price-row { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); }
.price { margin-left: auto; font-size: 1.6rem; color: var(--text); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: .9rem; }
.agree input { margin-top: 4px; accent-color: var(--cyan); }
.fine { color: var(--muted); font-size: .78rem; margin: 12px 0 0; text-align: center; }

/* ---------- other pages */
.page { padding: 48px 0; min-height: 50vh; }
.licence-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; margin: 20px 0; }
.lc-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lc-row:last-child { border: 0; }
.lc-row span { color: var(--muted); }
.lc-row strong { text-align: right; }
.break { word-break: break-all; }
.steps-list li { margin-bottom: 8px; }
.credit { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; white-space: pre-wrap; font-size: .88rem; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cyan); animation: spin 1s linear infinite; margin: 20px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.terms h2 { font-size: 1.1rem; margin-top: 2em; }
.terms li { margin-bottom: 6px; }

/* ---------- narrow screens */
@media (max-width: 900px) {
  .track { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "play info meta" "wave wave wave" "actions actions actions" "details details details"; }
  .cover { display: none; }
  .wave { height: 36px; }
  .actions { justify-content: flex-end; }
  .details { padding-left: 0; }
  .p-meta { width: auto; flex: 1; }
  .p-wave, .p-time, .p-vol, #p-prev, .p-cover { display: none; }
}
@media (max-width: 560px) {
  .main-nav a:not([href="./"]):not([href="terms.php"]) { display: none; }
  .brand span { letter-spacing: .2em; font-size: .9rem; }
  .filter-group { flex-direction: column; gap: 6px; }
  .fg-label { width: auto; padding: 0; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Licensing tips for our other labels (2026-11-06) */
.xs { margin-top: 48px; }
.xs-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.xs-card { flex: 1 1 280px; display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.xs-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.xs-logo { flex: none; width: 96px; height: 76px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 4px; }
.xs-logo img { max-width: 100%; max-height: 100%; height: auto; }
.xs-text { display: flex; flex-direction: column; gap: 3px; font-size: .92rem; line-height: 1.4; }
.xs-text span { color: var(--muted); }
.xs-text .xs-go { color: var(--cyan); font-weight: 600; font-size: .86rem; }
.xs-card, .xs-text { min-width: 0; }
.xs-go { overflow-wrap: anywhere; }
@media (max-width: 480px) { .xs-logo { width: 64px; } .xs-logo img { max-width: 64px; } }
