/*
 * The MixMusic site: Material 3 components on neutral near-black greys.
 * Colour comes from two places only: the brand pink of the mark and the
 * download button, and the artwork of each screenshot, which tints its
 * glow and the active tab.
 */

@font-face {
  font-family: Figtree;
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Figtree;
  src: url("assets/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The glow and the active tab fade from one artwork colour to the next. */
@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #717ed6;
}

:root {
  color-scheme: dark;
  --bg: #121212;
  --surface-1: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #2a2a2a;
  --outline: rgba(255, 255, 255, 0.1);
  --outline-strong: rgba(255, 255, 255, 0.26);
  --ink: #ffffff;
  --ink-2: #adadad;
  --brand: #e6007e;
  --brand-text: #ff8cc6;
  --on-brand: #ffffff;
  --spotify: #1ed760;
  --youtube: #ff4040;

  --radius-card: 12px;
  --radius-chip: 8px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 150ms;
  --medium: 200ms;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 10vw, 128px);

  --font: Figtree, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", ui-monospace, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  scrollbar-color: #3a3a3a var(--bg);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--brand);
}

::selection { background: var(--brand); color: var(--on-brand); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3a3a; border: 3px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

code {
  font: 500 0.875em/1.4 var(--mono);
  background: var(--surface-3);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon, .icon use { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark { flex: none; }
.brand-mark use { stroke: none; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-chip);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }
.skip:hover { color: var(--bg); }

/* Buttons: round, with Material's state layer. */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 999px;
  font: 600 0.9375rem/1 var(--font);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  z-index: -1;
  transition: opacity var(--fast) var(--ease);
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.14; }
.btn-large { height: 52px; padding: 0 28px 0 22px; font-size: 1rem; }
.btn-small { height: 36px; padding: 0 16px 0 12px; font-size: 0.875rem; }

.btn-filled { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.btn-filled::after { background: #000; }
.btn-filled:hover { color: var(--on-brand); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.7); }
.btn-filled:hover::after { opacity: 0.1; }

.btn-outlined { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--outline-strong); }
.btn-outlined:hover { color: var(--ink); }

.btn-tonal { background: var(--surface-3); color: var(--ink); }
.btn-tonal:hover { color: var(--ink); }

/* The top app bar: flat on the page, raised once the page scrolls. */

.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  transition: background-color var(--medium) var(--ease), box-shadow var(--medium) var(--ease);
}
.appbar.is-raised { background: var(--surface-1); box-shadow: 0 1px 0 var(--outline); }
.appbar-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.appbar-nav { display: flex; gap: 4px; margin-left: auto; }
.appbar-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-chip);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.appbar-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.appbar-nav a[aria-current="true"] { color: var(--ink); }

/* Layout. */

/* The glows behind the screenshots and the player reach past the column;
   main clips them at the window's edges. Clip, unlike hidden, makes no
   scroll container, so the sticky sections still stick. */
main { display: block; overflow-x: clip; }
.hero,
.section,
.footer-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding-top: var(--section); }

.section-head { max-width: 720px; margin-bottom: 40px; display: grid; gap: 12px; }
h2 { font-size: clamp(1.875rem, 3.2vw, 2.625rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
h3 { font-size: 1.3125rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
.note { font-size: 0.9375rem; color: var(--ink-2); }

/* Hero. */

.hero { padding-top: clamp(48px, 7vw, 88px); }
.hero-copy { display: grid; gap: 20px; }
.hero h1 {
  text-wrap: wrap;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.038em;
}
.hero-sub { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.meta { font-size: 0.875rem; color: var(--ink-2); }

/* A screenshot on a soft glow of its artwork's colour. */

.stage { position: relative; margin: 0; isolation: isolate; }
.stage::before {
  content: "";
  position: absolute;
  inset: -12% -12% -20%;
  z-index: -1;
  background: radial-gradient(farthest-side at 50% 52%, color-mix(in srgb, var(--glow) 64%, transparent) 0%, color-mix(in srgb, var(--glow) 42%, transparent) 58%, transparent 100%);
  filter: blur(48px);
}
.stage img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 1px var(--outline), 0 18px 40px -28px rgba(0, 0, 0, 0.7);
  background: var(--surface-2);
}
.stage-hero { margin-top: clamp(40px, 5vw, 64px); }

/* Feature tabs. */

.tabs,
.gallery,
.walkthrough { transition: --glow var(--medium) var(--ease); }
.walkthrough .note { margin-top: 20px; max-width: 72ch; }
.tab-list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--outline);
  margin-bottom: 32px;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
  border-radius: var(--radius-chip) var(--radius-chip) 0 0;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--glow);
  transform: scaleX(0);
  transition: transform var(--medium) var(--ease);
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab[aria-selected="true"] .icon { color: var(--glow); }

.tab-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.stage-tab { display: grid; }
.stage-tab img { grid-area: 1 / 1; transition: opacity var(--medium) var(--ease); }
.stage-img { opacity: 0; }
.stage-img.is-shown { opacity: 1; }

.panel { display: grid; gap: 16px; align-content: start; }
.panel[hidden] { display: none; }
.panel p:not(.note) { color: var(--ink-2); font-size: 1.0625rem; }
.panel h3 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
.panel .note { padding-top: 16px; border-top: 1px solid var(--outline); }

.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink); font-weight: 500; }
.marks li { display: flex; align-items: center; gap: 10px; }
.mark { flex: none; width: 12px; height: 12px; }
.mark-spotify { background: var(--spotify); border-radius: 50%; }
.mark-youtube { background: var(--youtube); border-radius: 2px; }

.keys { margin: 0; display: grid; gap: 10px; }
.keys div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--outline); }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; color: var(--ink-2); }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-3);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  font: 600 0.8125rem/1 var(--font);
  font-variant-numeric: tabular-nums;
}

/* Walkthrough. */

.video { margin: 0; border-radius: var(--radius-card); overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--outline); }
.video video { width: 100%; }

.video video { cursor: pointer; }

/* The walkthrough's player: a round play button, its progress in the
   colour of its artwork, and the time. */
.player { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.play {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  isolation: isolate;
  transition: transform var(--fast) var(--ease);
}
.play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #000;
  opacity: 0;
  z-index: -1;
  transition: opacity var(--fast) var(--ease);
}
.play:hover { transform: scale(1.04); }
.play:hover::after { opacity: 0.08; }
.play:active { transform: scale(0.98); }
.play .icon { grid-area: 1 / 1; stroke-width: 2.4; }
.play .i-play { margin-left: 2px; }
.play .i-pause,
.play.is-playing .i-play { display: none; }
.play.is-playing .i-pause { display: block; }
.time { flex: none; min-width: 7.5ch; text-align: right; color: var(--ink-2); font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* A click or a drag on the bar seeks. */
.scrub {
  position: relative;
  flex: 1;
  height: 20px;
  cursor: pointer;
  touch-action: none;
}
.scrub::before,
.scrub-fill {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  height: 4px;
  border-radius: 2px;
}
.scrub::before { right: 0; background: var(--surface-3); }
.scrub-fill { width: 0; background: var(--glow); }
.scrub-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform var(--fast) var(--ease);
}
.scrub:hover .scrub-fill::after,
.scrub:focus-visible .scrub-fill::after { transform: scale(1); }
.scrub:focus-visible { outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-chip);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--outline-strong);
  color: var(--ink);
  font: 600 0.875rem/1 var(--font);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, 0.06); }
.chip.is-current { background: color-mix(in srgb, var(--glow) 30%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 60%, transparent); }

/* Themes. */

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.stage-gallery { display: grid; }
.stage-gallery img { grid-area: 1 / 1; transition: opacity var(--medium) var(--ease); }
.gallery-img { opacity: 0; }
.gallery-img.is-shown { opacity: 1; }
.gallery-side { display: grid; gap: 20px; align-content: start; }
.gallery-caption { color: var(--ink-2); min-height: 4.6em; }
.gallery-caption strong { display: block; color: var(--ink); font-size: 1.3125rem; font-weight: 750; letter-spacing: -0.015em; margin-bottom: 4px; }
.chips-themes { margin-top: 0; }
.chip-theme { padding-left: 10px; }
.dots { display: inline-flex; }
.dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.dots i + i { margin-left: -4px; }
.chip-theme.is-current .dots i { box-shadow: 0 0 0 2px color-mix(in srgb, var(--glow) 30%, var(--surface-2)); }

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 40px;
  border-top: 1px solid var(--outline);
}
.column { display: grid; gap: 14px; align-content: start; justify-items: start; }
.column h3 { display: flex; align-items: center; gap: 10px; }
.column h3 .icon { color: var(--ink); }
.column p { color: var(--ink-2); max-width: 62ch; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.link:hover { color: var(--brand-text); }
.link .icon { transition: transform var(--fast) var(--ease); }
.link:hover .icon { transform: translate(2px, -2px); }

/* Download. */

.systems {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.system {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 24px;
  border-radius: var(--radius-card);
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--outline);
  transition: box-shadow var(--medium) var(--ease);
}
.system h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.system p { color: var(--ink-2); font-size: 0.9375rem; }
.system .system-files { color: var(--ink); font-weight: 600; font-size: 0.875rem; margin-bottom: 8px; }
.system .btn { margin-top: auto; align-self: flex-start; }
.system-yours {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}
.system.is-yours { box-shadow: inset 0 0 0 2px var(--outline-strong); }
.system.is-yours .system-yours { display: block; }
.system.is-yours .btn { background: var(--brand); color: var(--on-brand); }
.system.is-yours .btn::after { background: #000; }

.needs {
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--radius-card);
  background: var(--surface-1);
  display: grid;
  gap: 24px;
}
.needs dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.needs dt { font-weight: 700; margin-bottom: 4px; }
.needs dd { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.needs code { white-space: normal; overflow-wrap: anywhere; }

/* Open source. */

.section-open {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.open-copy { display: grid; gap: 16px; }
.open-copy p { color: var(--ink-2); max-width: 52ch; }
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.links a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-chip);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease);
}
.links a:hover { background: var(--surface-2); color: var(--ink); }
.links strong { font-weight: 700; }
.links span { color: var(--ink-2); font-size: 0.875rem; }

/* Footer. */

.footer { margin-top: var(--section); border-top: 1px solid var(--outline); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.footer-inner p { flex: 1; color: var(--ink-2); font-size: 0.875rem; max-width: 70ch; }
.brand-small { font-size: 1rem; }

/* The player in the hero: a working copy of MixMusic's window in its
   default theme, Mix, drawn at the app's own measures (a 1280x760 window)
   and scaled to the column, or its mini player on narrow screens. Its
   accent follows the cover playing, as the app's does by default. */

@font-face {
  font-family: Selawik;
  src: url("assets/fonts/selawkl.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Selawik;
  src: url("assets/fonts/selawk.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@property --art {
  syntax: "<color>";
  inherits: true;
  initial-value: #cf6e74;
}

html.no-js .demo-wrap { display: none; }
html.js .demo-fallback { display: none; }

.demo-wrap {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  margin-top: clamp(40px, 5vw, 64px);
  transition: --art 400ms var(--ease);
}
.demo-wrap::before {
  content: "";
  position: absolute;
  inset: -10% -10% 0;
  z-index: -1;
  background: radial-gradient(farthest-side at 50% 46%, color-mix(in srgb, var(--art) 40%, transparent) 0%, color-mix(in srgb, var(--art) 20%, transparent) 56%, transparent 100%);
  filter: blur(48px);
  pointer-events: none;
}

.app-frame {
  height: calc(760px * var(--fit, 0.9375));
  perspective: 1800px;
  overflow-x: clip;
}
.app {
  --m-bg: #000000;
  --m-panel: #0b0b0b;
  --m-track: #292929;
  --m-raised: #181818;
  --m-hair: rgba(255, 255, 255, 0.16);
  --m-ink: #ffffff;
  --m-muted: #a3a3a3;
  --m-hover: rgba(255, 255, 255, 0.07);
  --m-accent: var(--art);
  --m-accent-ink: #000000;
  width: 1280px;
  height: 760px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 340px;
  grid-template-rows: 48px minmax(0, 1fr) 92px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--m-bg);
  color: var(--m-ink);
  font: 400 15px/1.35 Selawik, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 80px -40px rgba(0, 0, 0, 0.95);
  transform: rotateX(var(--tilt, 0deg)) scale(calc(var(--fit, 0.9375) * var(--tilt-scale, 1)));
  transform-origin: 0 0;
}
.app svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.app .app-rings { stroke-width: 2.4; }
.app .app-rings-accent { stroke: var(--m-accent); }
.app ::selection { background: var(--m-accent); color: var(--m-accent-ink); }
.app :focus-visible,
.mini :focus-visible,
.mini-queue :focus-visible { outline: 2px solid var(--m-accent, var(--art)); outline-offset: 2px; border-radius: 0; }

/* Icon buttons, round buttons, sliders and the segment, as the app draws them. */
.a-ico { display: grid; place-items: center; width: 32px; height: 32px; color: var(--m-ink); }
.a-quiet { color: var(--m-muted); }
.a-btn { border: 0; background: none; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.a-btn:hover { background: var(--m-hover); }
.a-btn[aria-pressed="true"] { color: var(--m-accent); }
.a-like[aria-pressed="true"] svg { fill: currentColor; }
.a-round {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--m-ink);
  border-radius: 50%;
  background: none;
  color: var(--m-ink);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.a-round:active { background: var(--m-ink); color: var(--m-bg); }
.a-main { width: 48px; height: 48px; border: 0; background: var(--m-ink); color: var(--m-bg); }
.a-main:hover { background: var(--m-accent); color: var(--m-accent-ink); }
.a-main .i-play { fill: currentColor; margin-left: 2px; }
.a-main .i-pause,
.a-main.is-playing .i-play { display: none; }
.a-main.is-playing .i-pause { display: block; }
[data-repeat] .i-repeat-one,
[data-repeat][data-mode="one"] .i-repeat { display: none; }
[data-repeat][data-mode="one"] .i-repeat-one { display: block; }
[data-mute] .i-muted,
[data-mute].is-muted .i-vol { display: none; }
[data-mute].is-muted .i-muted { display: block; }

.a-slider { position: relative; height: 22px; margin: 0 11px; cursor: pointer; touch-action: none; }
.a-slider::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 6px; background: var(--m-track); }
.a-fill { position: absolute; left: 0; top: 8px; height: 6px; width: 0; background: var(--m-accent); }
.a-fill::after {
  content: "";
  position: absolute;
  right: -11px;
  top: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--m-ink);
}
.a-seg { display: inline-flex; box-shadow: inset 0 0 0 2px var(--m-ink); }
.a-seg span { padding: 6px 14px; font-size: 13px; }
.a-seg .is-on { background: var(--m-accent); color: var(--m-accent-ink); }
.a-link { color: var(--m-accent); font-size: 13px; }
.a-dim { color: var(--m-muted); }

/* The title bar. */
.app-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.app-brand { display: flex; align-items: center; gap: 10px; width: 232px; font-size: 24px; font-weight: 300; letter-spacing: -0.03em; }
.app-brand .a-ico { margin-left: auto; margin-right: 12px; }
.app-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 462px;
  height: 34px;
  margin-left: 18px;
  padding: 0 12px;
  box-shadow: inset 0 0 0 2px var(--m-ink);
  color: var(--m-ink);
  cursor: text;
}
.app-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--m-ink); font: inherit; outline: none; }
.app-search input::placeholder { color: var(--m-muted); }
.app-search input::-webkit-search-cancel-button { filter: invert(1); }
.app-search:focus-within { box-shadow: inset 0 0 0 2px var(--m-accent); }
.app-hint { margin-left: auto; margin-right: 348px; color: var(--m-muted); font-size: 12px; }

/* The rail. */
.app-rail { display: flex; flex-direction: column; min-height: 0; padding: 24px 16px 16px; }
.app-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.app-nav li { display: flex; align-items: center; gap: 12px; height: 42px; font-size: 18px; }
.app-box { display: grid; place-items: center; width: 42px; height: 42px; box-shadow: inset 0 0 0 2px var(--m-ink); }
.app-nav .is-on { color: var(--m-accent); }
.app-nav .is-on .app-box { background: var(--m-accent); box-shadow: none; color: var(--m-accent-ink); }
.app-mixes-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 10px; color: var(--m-accent); }
.app-mixes-head svg { color: var(--m-ink); }
.app-mixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.app-mixes li { display: flex; justify-content: space-between; }
.app-mixes b { font-weight: 400; color: var(--m-accent); font-size: 13px; }
.app-live { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.app-live img { width: 76px; height: 76px; object-fit: cover; }
.app-live span { display: grid; min-width: 0; }
.app-live b,
.app-live small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-live b { font-weight: 400; }
.app-live small { color: var(--m-muted); font-size: 13px; }

/* The pane: now playing, or search. */
.app-pane { min-width: 0; min-height: 0; overflow: hidden; padding: 20px 40px 0; }
.app-page[hidden] { display: none; }
.app-word {
  margin: 0 0 28px;
  font-size: 58px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: lowercase;
  text-wrap: nowrap;
}
.app-now { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.app-sleeve { position: relative; width: 260px; height: 260px; background: var(--m-raised); }
.app-sleeve img { width: 100%; height: 100%; object-fit: cover; }
.app-sleeve canvas { position: absolute; left: 0; bottom: 0; width: 100%; height: 33.4%; }
.app-now-side { display: grid; gap: 22px; min-width: 0; }
.app-credits { display: flex; gap: 8px; margin: 0; font-size: 13px; }
.app-progress { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; color: var(--m-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.app-progress span:first-child { text-align: right; }
.app-row { display: flex; align-items: center; gap: 12px; }
.app-now-side .a-seg { justify-self: start; }
.app-empty { margin: 0; color: var(--m-muted); font-size: 15px; }

/* The up next panel and its rows. */
.app-panel { display: flex; flex-direction: column; min-height: 0; background: var(--m-panel); border-left: 1px solid var(--m-hair); }
.app-panel-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px 24px; }
.app-panel-head h3 { flex: 1; margin: 0; font-size: 28px; font-weight: 300; letter-spacing: -0.02em; }
.app-cap { margin: 0 0 6px; padding-left: 20px; color: var(--m-accent); font-size: 13px; }
.app-panel-lyrics { display: grid; gap: 20px; justify-items: start; padding: 4px 24px; }
.app-panel [hidden] { display: none; }
.app-rows { list-style: none; margin: 0; padding: 0 12px; display: grid; gap: 0; overflow: hidden; }
.app-rows button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--m-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.app-rows button:hover { background: var(--m-hover); }
.app-rows img { width: 40px; height: 40px; object-fit: cover; }
.app-rows .r-text { display: grid; min-width: 0; }
.app-rows .r-text b,
.app-rows .r-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-rows .r-text b { font-weight: 400; }
.app-rows .r-text small { color: var(--m-muted); font-size: 13px; }
.app-rows .r-time { color: var(--m-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.app-rows .is-current button,
.app-rows .is-current button:hover { background: var(--m-accent); color: var(--m-accent-ink); }
.app-rows .is-current .r-text small,
.app-rows .is-current .r-time { color: var(--m-accent-ink); }
.app-pane .app-rows { padding: 0; max-width: 560px; }
.app-pane .app-empty { padding: 8px 0; }

/* The player bar. */
.app-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 24px 0 16px;
  background: var(--m-panel);
  border-top: 1px solid var(--m-hair);
}
.app-bar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-bar-left img { width: 62px; height: 62px; object-fit: cover; }
.app-bar-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.app-bar-text b,
.app-bar-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar-text b { font-weight: 400; }
.app-bar-text small { color: var(--m-muted); font-size: 13px; }
.app-bar-text .a-next { font-size: 12px; }
.app-bar-mid { display: grid; justify-items: center; gap: 6px; }
.app-transport { display: flex; align-items: center; gap: 12px; }
.app-progress-bar { width: 100%; max-width: 640px; }
.app-bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.app-bar .a-slider { --m-track: #323232; }
.a-volume { width: 100px; margin: 0 14px 0 11px; }

/* The mini player: the cover the window's height, what plays and the
   transport beside it, and the progress as a line along its foot. */
.mini-frame { display: none; grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
.demo-wrap[data-view="mini"] .app-frame { display: none; }
.demo-wrap[data-view="mini"] .mini-frame { display: grid; justify-items: center; }
.mini-frame > .mini { transform: scale(var(--mfit, 1.4)); transform-origin: 50% 0; margin-bottom: calc(132px * (var(--mfit, 1.4) - 1)); }
.mini {
  --m-bg: #000000;
  --m-raised: #181818;
  --m-hair: rgba(255, 255, 255, 0.16);
  --m-ink: #ffffff;
  --m-muted: #a3a3a3;
  --m-hover: rgba(255, 255, 255, 0.07);
  --m-accent: var(--art);
  --m-accent-ink: #000000;
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  width: 420px;
  height: 132px;
  background: var(--m-bg);
  color: var(--m-ink);
  font: 400 15px/1.35 Selawik, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 60px -30px rgba(0, 0, 0, 0.95);
}
.mini svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.mini-art { width: 132px; height: 132px; object-fit: cover; }
.mini-body { display: grid; align-content: center; gap: 8px; min-width: 0; padding: 0 12px; }
.mini-title { font-size: 20px; font-weight: 300; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-line { display: flex; gap: 6px; margin: 0; min-width: 0; color: var(--m-muted); }
.mini-line small { font-size: 13px; }
.mini-line small:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-time { font-size: 12px !important; font-variant-numeric: tabular-nums; }
.mini-controls { display: flex; align-items: center; gap: 8px; }
.mini-toggle { width: 40px; height: 40px; }
.mini-corner { padding: 4px; align-self: start; }
.mini-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--m-accent); }
.mini-queue { display: none; }

/* Narrow screens: the app is for desktops, so a phone sees its mini
   player, with up next under it. */
@container (max-width: 700px) {
  .demo-wrap .app-frame { display: none; }
  .demo-wrap .mini-frame { display: grid; justify-items: stretch; gap: 16px; }
  .mini-frame > .mini { width: auto; transform: none; margin-bottom: 0; }
  .mini-open { display: none; }
  .mini-queue {
    --m-ink: #ffffff;
    --m-muted: #a3a3a3;
    --m-hover: rgba(255, 255, 255, 0.07);
    --m-accent: var(--art);
    --m-accent-ink: #000000;
    display: grid;
    padding: 8px 0;
    background: #000000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
    font: 400 15px/1.35 Selawik, "Segoe UI", system-ui, sans-serif;
  }
}

.demo-note { margin: 18px auto 0; max-width: 78ch; text-align: center; color: var(--ink-2); font-size: 0.8125rem; }
.demo-note a { color: var(--ink-2); }
.demo-note a:hover { color: var(--ink); }
.note-mini { display: none; }
@container (max-width: 700px) {
  .note-full { display: none; }
  .note-mini { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .app { transform: scale(var(--fit, 0.9375)); }
}

/* Two services, one queue: as the page scrolls, the two services'
   columns slide together into one queue. Without script, or with reduced
   motion, the queue is simply shown. */

.merge { margin-top: var(--section); }
.merge-sticky {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 32px;
}
.merge-head { display: grid; gap: 12px; max-width: 720px; }
.merge-label { display: none; }
.merge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: min(440px, 100%); }
.merge-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-chip);
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--outline);
}
.merge-row img { width: 44px; height: 44px; border-radius: 6px; }
.merge-text { display: grid; min-width: 0; }
.merge-text strong { font-weight: 700; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merge-text > span { display: block; color: var(--ink-2); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merge-text .mark { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }
.merge-note { color: var(--ink-2); font-size: 0.875rem; }

.merge.is-live { height: 240vh; }
.merge.is-live .merge-sticky {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  grid-template-rows: auto minmax(0, 1fr);
  padding-top: clamp(24px, 5vh, 56px);
  padding-bottom: 24px;
}
.merge.is-live .merge-stage { position: relative; min-height: 0; }
.merge.is-live .merge-list { position: absolute; inset: 0; width: auto; display: block; }
.merge.is-live .merge-row { position: absolute; left: 0; top: 0; will-change: transform; }
.merge.is-live .merge-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  will-change: transform, opacity;
}
.merge-label .mark { width: 10px; height: 10px; }
.merge-label .icon { color: var(--ink-2); }
.merge-row { transition: box-shadow var(--medium) var(--ease); }
.merge.is-live .merge-row.is-merged { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--row-art, var(--ink)) 70%, transparent); }

/* Sections ease in as they scroll into the window, driven by the scroll
   itself; where scroll timelines are missing, they are simply there. */
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}

/* Smaller windows. */

@media (max-width: 960px) {
  .tab-body,
  .gallery,
  .section-open { grid-template-columns: minmax(0, 1fr); }
  .systems { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .appbar-nav { display: none; }
  .appbar-inner .btn { margin-left: auto; }
  .columns,
  .needs dl,
  .links { grid-template-columns: minmax(0, 1fr); }
  .needs { padding: 24px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .section-head { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
