/* bocan.app — main stylesheet
 * Winamp-nostalgic but modern. Dark plum, neon spectrum, sharp edges.
 * No frameworks. No build step. Just CSS.
 */

:root {
  --bg: #1a1024;
  --bg-elev: #241634;
  --bg-elev-2: #2e1d44;
  --ink: #f4ecff;
  --ink-dim: #b9a8d4;
  --ink-faint: #7d6c97;
  --accent: #ff7a59;
  --accent-2: #a259ff;
  --accent-3: #59ffd2;
  --rule: #3a2854;
  --warn: #ffcc4a;
  --danger: #ff5577;

  --font-display: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --maxw: 1100px;
}

@media (prefers-color-scheme: light) {
  /* We stay dark. Bòcan is a music player. Music players are dark. */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(ellipse at top, #2a1740 0%, var(--bg) 60%) fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-3);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 1.5em 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code {
  background: var(--bg-elev);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
kbd {
  background: var(--bg-elev-2);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  color: var(--ink);
}
pre {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1em;
  overflow-x: auto;
}
pre code { background: none; border: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1em;
  top: 1em;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5em 1em;
  border-radius: var(--radius);
  z-index: 1000;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25em 1.5em;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}
.brand:hover { color: var(--ink); }
.brand__mark { display: inline-flex; }
.site-nav {
  display: flex;
  gap: 0.4em;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.5em 0.9em;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { background: var(--bg-elev); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-elev);
}
.site-nav__github {
  border: 1px solid var(--rule);
}

/* Footer */

.site-footer {
  max-width: var(--maxw);
  margin: 4em auto 2em;
  padding: 2em 1.5em;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.site-footer__small {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Layout helpers */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5em;
}
.container--narrow { max-width: 760px; }

/* Hero (home) */

.hero {
  text-align: center;
  padding: 4em 1.5em 5em;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-3);
  background: rgba(89, 255, 210, 0.08);
  border: 1px solid rgba(89, 255, 210, 0.3);
  border-radius: 999px;
  padding: 0.4em 1em;
  margin-bottom: 1.5em;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--ink-dim);
  max-width: 36ch;
  margin: 1em auto 0;
}
.hero__cta {
  margin-top: 2em;
  display: flex;
  gap: 0.8em;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__meta {
  margin-top: 1em;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover { color: #fff; }

.btn--secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--rule);
}
.btn--secondary:hover { background: var(--bg-elev-2); color: var(--ink); }

/* Spectrum analyser hero ornament */

.spectrum {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: flex-end;
  height: 90px;
  margin: 2em auto 0;
  max-width: 360px;
}
.spectrum__bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-3), var(--accent-2), var(--accent));
  border-radius: 2px 2px 0 0;
  animation: spectrum 1.4s ease-in-out infinite;
  transform-origin: bottom;
}
.spectrum__bar:nth-child(1)  { animation-delay: -0.1s; }
.spectrum__bar:nth-child(2)  { animation-delay: -0.6s; }
.spectrum__bar:nth-child(3)  { animation-delay: -0.3s; }
.spectrum__bar:nth-child(4)  { animation-delay: -0.9s; }
.spectrum__bar:nth-child(5)  { animation-delay: -0.2s; }
.spectrum__bar:nth-child(6)  { animation-delay: -1.1s; }
.spectrum__bar:nth-child(7)  { animation-delay: -0.4s; }
.spectrum__bar:nth-child(8)  { animation-delay: -0.7s; }
.spectrum__bar:nth-child(9)  { animation-delay: -0.5s; }
.spectrum__bar:nth-child(10) { animation-delay: -1.0s; }
.spectrum__bar:nth-child(11) { animation-delay: -0.3s; }
.spectrum__bar:nth-child(12) { animation-delay: -0.8s; }
.spectrum__bar:nth-child(13) { animation-delay: -0.2s; }
.spectrum__bar:nth-child(14) { animation-delay: -0.6s; }
.spectrum__bar:nth-child(15) { animation-delay: -0.4s; }

@keyframes spectrum {
  0%, 100% { transform: scaleY(0.2); }
  50%      { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .spectrum__bar { animation: none; transform: scaleY(0.5); }
}

/* Feature grid */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1em;
  max-width: var(--maxw);
  margin: 3em auto;
  padding: 0 1.5em;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.4em 1.4em 1.6em;
  transition: border-color 120ms ease, transform 120ms ease;
}
.feature:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}
.feature h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--accent-3);
}
.feature p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

/* Section helpers */

.section {
  max-width: var(--maxw);
  margin: 4em auto;
  padding: 0 1.5em;
}
.section--narrow {
  max-width: 760px;
}
.section h2 {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4em;
}

/* Pull-quote / poke at the user */

.poke {
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  padding: 1em 1.4em;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--ink-dim);
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}
th, td {
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
th {
  color: var(--ink-dim);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Download page */

.dl-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 2em;
  margin: 2em 0;
  text-align: center;
}
.dl-card h2 { margin-top: 0; }
.dl-meta {
  display: flex;
  gap: 2em;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5em;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.dl-meta strong { color: var(--ink); }

/* Changelog */

.changelog h2:first-of-type { margin-top: 0; }
.changelog h3 { color: var(--accent-3); }

/* Screenshot marquee */

.screenshots-marquee {
  overflow: hidden;
  padding: 3em 0 2em;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee__track {
  display: flex;
  gap: 1.5em;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee__track:hover { animation-play-state: paused; }
.marquee__img {
  height: 260px;
  width: auto;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  display: block;
}

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

@media (prefers-reduced-motion: reduce) {
  .screenshots-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee__track { animation: none; }
}

/* Responsive */

@media (max-width: 640px) {
  .site-header { padding: 1em; }
  .site-nav { font-size: 0.9rem; }
  .hero { padding: 3em 1em 2em; }
  .marquee__img { height: 180px; }
}
