@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 1000;
  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: "Nunito";
  src: url("assets/fonts/nunito-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 1000;
  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;
}

/* Palette taken from the logo */
:root {
  --navy: #182537;       /* logo background */
  --navy-deep: #111a28;  /* panels */
  --slate: #3b5275;      /* ear cups */
  --blue: #4fa7ff;       /* headband, "brainz" */
  --pale: #c7cfdf;       /* brain, "music" */
  --muted: #8e9bb3;      /* grey waveform bars */

  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --measure: 38rem;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--pale);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #7fbfff;
}

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

code,
kbd {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--navy-deep);
  border: 1px solid #26354d;
  border-radius: 5px;
  padding: 0.08em 0.35em;
  color: var(--pale);
}

h1,
h2,
h3 {
  font-weight: 850;
  line-height: 1.15;
  color: var(--pale);
  margin: 0;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

p {
  margin: 0 0 1rem;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.wordmark .w-music {
  color: var(--pale);
}

.wordmark .w-brainz {
  color: var(--blue);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a:not(.button) {
  color: var(--pale);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"] {
  color: var(--blue);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
}

.button-primary {
  background: var(--blue);
  color: #0c1522;
}

.button-primary:hover {
  background: #7fbfff;
  color: #0c1522;
}

.button-secondary {
  border-color: var(--slate);
  color: var(--pale);
}

.button-secondary:hover {
  border-color: var(--blue);
  color: var(--pale);
}

.button-small {
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 4rem;
  max-width: 48rem;
  margin: 0 auto;
}

.hero-emblem {
  width: min(100%, 30rem);
  margin: 0 auto 1.5rem;
}

.hero h1 {
  font-size: clamp(3rem, 11vw, 5.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.hero .lede {
  font-size: 1.3rem;
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 auto 2rem;
  color: var(--pale);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- content sections ---------- */

.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-intro {
  max-width: var(--measure);
  color: var(--muted);
}

.section-intro p:last-child {
  margin-bottom: 0;
}

/* waveform rule between sections, echoing the logo bars */
.wave-rule {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin: 0 auto;
}

.wave-rule span {
  width: 5px;
  border-radius: 3px;
  background: var(--muted);
}

.wave-rule span:nth-child(1),
.wave-rule span:nth-child(7) { height: 10px; }
.wave-rule span:nth-child(2),
.wave-rule span:nth-child(6) { height: 22px; background: var(--blue); }
.wave-rule span:nth-child(3),
.wave-rule span:nth-child(5) { height: 32px; }
.wave-rule span:nth-child(4) { height: 16px; background: var(--slate); }

/* ---------- chat demo ---------- */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: start;
}

.chat {
  background: var(--navy-deep);
  border: 1px solid #22324a;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 0.5rem;
  font-size: 0.98rem;
}

.chat-channel {
  font-weight: 800;
  color: var(--muted);
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #22324a;
}

.msg {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 0.8rem;
  margin-bottom: 1.1rem;
}

.msg-used {
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--muted);
}

.msg-used code {
  font-size: 0.85em;
}

.avatar {
  grid-column: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--navy);
  background: var(--muted);
}

.avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.msg-body {
  grid-column: 2;
}

.msg-name {
  font-weight: 850;
  color: var(--blue);
  margin-right: 0.35rem;
}

.msg-name.user {
  color: var(--pale);
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 900;
  background: var(--slate);
  color: var(--pale);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  vertical-align: 0.15em;
}

.msg p {
  margin: 0.1rem 0 0;
}

.queue-list {
  margin: 0.25rem 0 0;
  padding-left: 1.3rem;
}

/* the one animated element: bars beside the track that is playing */
.playing {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 0.85em;
  margin-right: 0.35rem;
}

.playing i {
  width: 3px;
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transform-origin: bottom;
  animation: eq 1.1s ease-in-out infinite;
}

.playing i:nth-child(2) { animation-delay: -0.35s; }
.playing i:nth-child(3) { animation-delay: -0.7s; }

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

@media (prefers-reduced-motion: reduce) {
  .playing i {
    animation: none;
    transform: scaleY(0.7);
  }
}

/* ---------- feature list ---------- */

.features {
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 3rem;
}

.demo + .section {
  padding-top: 1rem;
}

.features div {
  padding-left: 1rem;
  border-left: 4px solid var(--slate);
}

.features div:nth-child(odd) {
  border-left-color: var(--blue);
}

.features dt {
  font-weight: 850;
  font-size: 1.1rem;
  color: var(--pale);
}

.features dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

/* ---------- closing call to action ---------- */

.closing {
  text-align: center;
  max-width: 40rem;
}

.closing p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ---------- docs ---------- */

.docs {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.docs-toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.docs-toc p {
  font-weight: 850;
  margin-bottom: 0.5rem;
}

.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--slate);
}

.docs-toc a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.docs-toc a:hover {
  color: var(--blue);
}

.docs-content {
  max-width: 42rem;
}

.docs-content > h1 {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.docs-content > .lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.docs-content section {
  padding-top: 2.5rem;
  scroll-margin-top: 1rem;
}

.docs-content ol,
.docs-content ul {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}

.docs-content li {
  margin-bottom: 0.4rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #26354d;
}

th {
  color: var(--muted);
  font-weight: 800;
}

td:first-child {
  white-space: nowrap;
}

.faq dt {
  font-weight: 850;
  margin-top: 1.1rem;
}

.faq dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* ---------- footer ---------- */

.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid #26354d;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--muted);
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .demo,
  .docs,
  .features {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .docs-toc {
    position: static;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .site-nav .nav-home {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand .wordmark {
    display: none;
  }
}
