/* SourSounds site styles. Shared by the React app and the server-rendered blog.
   Theme: "plum", deep purple + lemon (Cee picked it 2026-09-30 over black + lemon).
   Purple is the dark ground and small accents; lemon carries the brand. */

:root {
  --bg: #110a1c;
  --bg-glow: rgb(124 77 255 / 0.24);
  --panel: #1b1129;
  --panel-2: #261838;
  --line: #3a2854;
  --text: #f6f1fb;
  --muted: #a99cbc;
  --accent: #ffd23f;       /* lemon */
  --accent-2: #f2b705;     /* rind */
  --accent-ink: #1b1305;
  --violet: #9b7bff;       /* links, focus, small highlights */
  --rec: #ff4d6d;
  --warn: #ffb02e;
  --ok: #7ee2a8;
  --radius: 14px;
  --font-display: "Syne", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, var(--bg-glow), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: 1.3rem; margin-top: 1.6em; font-weight: 700; }
main { min-height: calc(100vh - 150px); }
img { max-width: 100%; height: auto; }

/* ---------- header / footer ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.7rem 1rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(10px);
}
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.logo__mark { width: 40px; height: auto; color: var(--text); }
.logo__word { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.logo__word span { color: var(--accent); }
.nav { display: flex; gap: 0.15rem; flex-wrap: wrap; flex: 1; }
.nav__link { padding: 0.4rem 0.7rem; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav__link:hover, .nav__link.active, .nav__link[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.wallet { display: flex; gap: 0.5rem; align-items: center; }
.wallet__dev { width: 6rem; background: var(--panel); color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 0.3rem 0.5rem; }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding: 1.75rem 1rem; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.9rem;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer__links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- basics ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 2.25rem 1rem 3.5rem; }
.page--narrow { max-width: 760px; }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--rec); }
.success { color: var(--ok); }
.notice { background: var(--panel-2); border-left: 3px solid var(--accent); padding: 0.7rem 1rem; border-radius: 8px; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.8rem; margin: 0 0 0.5rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.panel + .panel { margin-top: 1rem; }
.panel h2 { margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 11px;
  padding: 0.6rem 1.05rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform 0.08s, background 0.15s;
}
.btn:hover { background: #ffdc66; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn:disabled:hover { background: var(--panel-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; transform: none; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--panel-2); }
.btn--big { padding: 0.85rem 1.45rem; font-size: 1.05rem; }
.btn--small { padding: 0.28rem 0.65rem; font-size: 0.85rem; border-radius: 8px; }
.btn--rec { background: var(--rec); color: #fff; }

.chip { display: inline-block; padding: 0.16rem 0.62rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--panel-2); text-decoration: none; color: var(--muted); }
.chip--wallet { background: var(--accent); color: var(--accent-ink); font-size: 0.95rem; padding: 0.32rem 0.85rem; }
.chip--queued, .chip--running { background: var(--warn); color: #000; }
.chip--succeeded { background: var(--accent); color: var(--accent-ink); }
.chip--failed { background: var(--rec); color: #fff; }
.chip--on { background: var(--accent); color: var(--accent-ink); }
.cost { color: var(--accent); font-weight: 700; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.3rem; font-weight: 600; flex: 1; min-width: 10rem; }
.field small { font-weight: 400; color: var(--muted); }
.field--inline { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; min-width: 0; }
input, textarea, select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px;
  padding: 0.6rem 0.75rem; font: inherit; font-weight: 400; width: 100%;
}
input[type="checkbox"], input[type="radio"], input[type="range"] { width: auto; }
.field--inline input { width: 5rem; }
.check { display: flex; gap: 0.5rem; align-items: center; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
.row--end { justify-content: flex-end; align-items: center; }
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; color: var(--muted); }
.drop:hover { border-color: var(--accent); }
.drop input { display: none; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.option { display: grid; gap: 0.2rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem; cursor: pointer; }
.option input { display: none; }
.option--on { border-color: var(--accent); background: var(--panel-2); }
.library { display: grid; gap: 0.3rem; max-height: 16rem; overflow: auto; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- jobs ---------- */
.jobs { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.job { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; }
.job__head { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.job__outputs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }

/* ---------- studio ---------- */
.studio { max-width: 1280px; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
.studio > * { min-width: 0; } /* lets the drum grid scroll inside its panel */
.transport { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 0.4rem; overflow-x: auto; }
.grid__row { display: grid; grid-template-columns: 4.5rem repeat(16, minmax(1.6rem, 2.75rem)); gap: 0.3rem; align-items: center; }
.grid__label { text-transform: uppercase; font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.pad { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; padding: 0; }
.pad--beat { background: color-mix(in srgb, var(--panel-2) 85%, var(--violet)); }
.pad--on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgb(255 210 63 / 0.35); }
.pad--now { outline: 2px solid var(--text); outline-offset: 1px; }
.tracks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.track { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; gap: 0.75rem; align-items: center; background: var(--panel-2); border-radius: 11px; padding: 0.55rem 0.8rem; }
.track--muted { opacity: 0.5; }
.track__controls { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.track__controls strong { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track__controls input[type="range"] { width: 6rem; padding: 0; }
.waveform { width: 100%; display: block; color: var(--accent); }

/* ---------- home ---------- */
.hero { padding: 3.5rem 0 2rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.hero__title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.04em; margin: 0.15em 0; line-height: 1; }
.hero__title em { font-style: normal; color: var(--accent); white-space: nowrap; }
.hero__art { width: 100%; max-width: 360px; justify-self: center; color: var(--text); filter: drop-shadow(0 20px 60px rgb(255 210 63 / 0.18)); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 2rem; }
.feature { text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature h2 { color: var(--accent); margin-top: 0; }
.feature p { color: var(--muted); margin: 0; }
.feature + .feature { margin-top: 0; }
.band { margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.band__card { padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel-2), var(--panel)); text-decoration: none; }
.band__card h2 { margin-top: 0; }
.band__card--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.band__card--accent .muted { color: rgb(27 19 5 / 0.75); }

/* ---------- blog ---------- */
.cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.post-card { display: grid; gap: 0.5rem; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.15s; }
.post-card:hover { border-color: var(--accent); }
.post-card__img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--panel-2); }
.post-card__body { padding: 0 1.1rem 1.1rem; display: grid; gap: 0.35rem; }
.post-card__body:first-child { padding-top: 1.1rem; }
.post-card h2 { font-size: 1.2rem; margin: 0; }
.post-card p { margin: 0; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.88rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.article { max-width: 720px; margin: 0 auto; }
.article__cover { width: 100%; border-radius: var(--radius); margin: 1rem 0 1.5rem; }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose h2 { font-size: 1.5rem; }
.prose a { color: var(--violet); }
.prose blockquote { margin: 1.2rem 0; padding: 0.3rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose img { border-radius: 10px; }
.prose code { background: var(--panel-2); padding: 0.1rem 0.35rem; border-radius: 5px; }
.sources { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.sources a { color: var(--muted); word-break: break-all; }
.pager { display: flex; justify-content: space-between; margin-top: 2rem; }
.cta { margin-top: 2.5rem; }

/* ---------- guess the song ---------- */
.guess { max-width: 640px; margin: 0 auto; text-align: center; }
.guess__card { margin-top: 1.5rem; position: relative; }
.guess__kind { margin: 1rem 0 0; font-size: 1.1rem; color: var(--accent); }
.guess__bonus { position: absolute; top: 1rem; right: 1rem; }
.guess__clue { font-size: clamp(2.4rem, 9vw, 4rem); letter-spacing: 0.08em; margin: 1.25rem 0; line-height: 1.3; }
.guess__lyric { font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 700; margin: 1.25rem 0; }
.guess__image { display: block; width: min(100%, 320px); aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin: 1.25rem auto; border: 1px solid var(--line); }
.guess__options { display: grid; gap: 0.6rem; margin: 0 0 1rem; }
.guess__option { font: inherit; font-size: 1.05rem; text-align: left; padding: 0.85rem 1rem; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.guess__option:hover:not(:disabled) { border-color: var(--accent); }
.guess__option:disabled { cursor: default; opacity: 0.6; }
.guess__option--right, .guess__option--right:disabled { border-color: var(--ok); background: rgb(126 226 168 / 0.12); opacity: 1; }
.guess__option--wrong, .guess__option--wrong:disabled { border-color: var(--rec); background: rgb(255 77 109 / 0.12); opacity: 1; }
.guess__result { font-size: 1.25rem; }
.guess__form { display: flex; gap: 0.6rem; }
.guess__score { display: flex; justify-content: center; gap: 1.5rem; color: var(--muted); }
.episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.embed { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--radius); background: var(--panel-2); }

/* ---------- merch / credits ---------- */
.collections { display: grid; gap: 1.5rem; }
.collection { border-top: 2px solid var(--accent); padding-top: 1rem; }
.soon { color: var(--muted); font-style: italic; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.product img { width: 100%; border-radius: var(--radius); }
.balance { font-size: 1.6rem; }
.balance strong { color: var(--accent); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.pack + .pack { margin-top: 0; }
.pack__credits { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin: 0.3rem 0 0.8rem; }
.menu { width: 100%; border-collapse: collapse; }
.menu td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.menu td:last-child { text-align: right; font-weight: 700; color: var(--accent); }

/* ---------- track check ---------- */
.track-check { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.report { display: grid; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.report__head { display: flex; gap: 1rem; align-items: center; }
.report__score { flex: none; width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; border: 3px solid currentColor; }
.report__score.is-good { color: var(--ok); }
.report__score.is-ok { color: var(--accent); }
.report__score.is-bad { color: var(--rec); }
.report__summary { margin: 0; font-size: 1.1rem; }
.report__issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.issue { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; align-items: start; background: var(--panel-2); border-radius: 11px; padding: 0.75rem 0.9rem; border-left: 3px solid var(--line); }
.issue p { margin: 0.2rem 0; color: var(--muted); }
.issue--high { border-left-color: var(--rec); }
.issue--high .issue__sev { background: var(--rec); color: #fff; }
.issue--medium { border-left-color: var(--accent); }
.issue--medium .issue__sev { background: var(--accent); color: var(--accent-ink); }
.issue__sev { justify-self: start; }
.job__output { display: inline-flex; gap: 0.35rem; align-items: center; }
.listen { height: 2.4rem; max-width: 100%; }
@media (max-width: 640px) { .issue { grid-template-columns: 1fr; } }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-list { display: grid; gap: 0.5rem; }
.admin-row { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.9rem; }
.admin-row__main { min-width: 0; flex: 1; }
.admin-row__main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
textarea.md { min-height: 22rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .hero__art { max-width: 200px; grid-row: 1; justify-self: start; }
}
@media (max-width: 640px) {
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav__link { white-space: nowrap; }
  .wallet { margin-left: auto; }
  .track { grid-template-columns: 1fr; }
  .grid__row { grid-template-columns: 3.2rem repeat(16, minmax(1.3rem, 1fr)); }
  .guess__form { flex-direction: column; }
}
